COLLECT date values from another sheet
There are 2 sheets with the same set of columns:
Code / Crop / Start / End / Cost
Start and End Columns are dates.
1) I need to collect date from column Start which satisfies the conditions Code = 1122, Crop = Apple. The formula is the following: =COLLECT({Sheet1 Range 1}, {Sheet1 Range 2}, @cell = Code@row, {Sheet1 Range 3}, @cell = Crop@row), where Range 1 = Start:Start, Range 2 = Code:Code, Range 3 = Crop:Crop.
Why it results #DATE EXPECTED?
2) I need to collect values from column Cost which satisfies the conditions Code = 1122, Crop = Apple. The formula is the following: =COLLECT({Sheet1 Range 4}, {Sheet1 Range 2}, @cell = Code@row, {Sheet1 Range 3}, @cell = Crop@row), where Range 4 = Cost:Cost, Range 2 = Code:Code, Range 3 = Crop:Crop.
Why it results #INVALID COLUMN VALUE?
Thank you in advance.
Best Answers
-
Try using an INDEX function.
=INDEX(COLLECT(...............), 1)
-
Sorting should not affect the formula. When you are creating your cross sheet references to look at entire columns, are you selecting the column header?
-
That would be why. If you are referencing an entire column you should be selecting the column header.
Answers
-
Try using an INDEX function.
=INDEX(COLLECT(...............), 1)
-
Everything works great until I change row sorting in the source table, then an error message appears (#INVALID VALUE)
-
In case of a more complex table with parent rows, how to set up a reference range only for children rows or for the whole column including parent and children rows?
-
Sorting should not affect the formula. When you are creating your cross sheet references to look at entire columns, are you selecting the column header?
-
But it affects. I don't select the column header, just a range of cells. After rows sorting the previously predetermined range in the reference window shrinks.
Range before sorting Start1 : Start12
Range after sorting Start3 : Start10
-
That would be why. If you are referencing an entire column you should be selecting the column header.
-
now everything works, thanx a lot
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 423 Global Discussions
- 221 Industry Talk
- 462 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 59 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!