Search code examples
google-sheetsgoogle-query-languagegoogle-sheets-query

Google sheet IF matches two conditions then copy four different columns


I am sharing the file

https://docs.google.com/spreadsheets/d/1AyboktjZ6vkqiIeN4Ecdo9VGrwjUJYFYxOot1y88CQs/edit?usp=sharing

I have two sheets named "sheet1" and "sheet2". I want selected information in "sheet2" from "sheet1" Here are the criteria

In "sheet1" on each row, if the value of column B is "yet_to_order" then if the value of column C is "company1" then the corresponding company1 data i.e., G3 to J3 must be copied to "sheet2" This must be done for each row the matching data must be copied to "sheet2"

How can I do this? you can edit the shared file!


Solution

  • In A3 try

    =filter(sheet1!G3:J, sheet1!B3:B="yet_to_order", sheet1!C3:C=A1)
    

    Change range to suit for the other companies.