Forum Discussion

Paxter's avatar
Paxter
Copper Contributor
Jan 05, 2025
Solved

Fetch data depending on value in list

I have a list of lines with a number of cells each containing values referring to the first cell , i.e.:

Sweater, 10, USD

Car, 10000, USD

Socks, 2, USD

 

In the last cell of every line I've made a roll-down list where I can choose a category, in this case "clothes" would be relevant for line 1 and 3.

 

In another sheet I have i column called "clothes". I want that column to fetch the value from the first cell of all the lines from the other sheet that is categorized "clothes", so the column in this case would show:

 

Sweater

Socks

 

Is this possible?

 

BR // Paxter

  • Let's say your data are on Sheet 1 in A2:D100, with items in column A and categories in column D.

    On the other sheet, the category clothes is in B1.

    In another cell:

    =FILTER('Sheet 1'!A2:A100, 'Sheet 1'!D2:D100=B1, "No Match")

6 Replies

  • Let's say your data are on Sheet 1 in A2:D100, with items in column A and categories in column D.

    On the other sheet, the category clothes is in B1.

    In another cell:

    =FILTER('Sheet 1'!A2:A100, 'Sheet 1'!D2:D100=B1, "No Match")

    • Paxter's avatar
      Paxter
      Copper Contributor

      Thank you so much! Let's say I have one column with dates and I only want the ones with a certain month (or months) to show, can I do that as well?

      • With dates in F2:F100:

        =FILTER('Sheet 1'!A2:F100, ('Sheet 1'!F2:F100>=DATE(2024, 10, 1))*('Sheet 1'F2:F100<=DATE(2024, 12, 31)), "No Match")

        will return the rows with dates in October, November and December of 2024.

Resources