Trying to import a few columns of code when it meets a certain criteria (it is for a member of staff called Jan) from my Master Checklist. The coloumn I want exportin are columns A-F. My code keeps coming up with errors:
=QUERY(IMPORTRANGE('Master Checklist'!,A3:F100,"select A3:F100 where G matches 'Jan'"))
My code keeps coming up with Error
CodePudding user response:
If everything is in the same spreadsheet:
=QUERY('Master Checklist'!A3:G,"select A,B,C,D,E,F where G matches 'Jan'")
importrange() is dedicated to external spreadsheet and you have to mention the id in this case
If you import value from another spreadsheet
=QUERY(IMPORTRANGE("id or url","'Master Checklist'!A3:G"),"select Col1,Col2,Col3,Col4,Col5,Col6 where Col7 matches 'Jan'")
Note that
- you do not need to mention the url, the id is sufficient
- A,B,C ... becomes Col1,Col2,Col3 ...