Formula to pull data from two lines into one line (same sheet)

Hi,
I wanted to see if it is possible to have a formula that uses data from two different rows within the same sheet based on certain criteria? Any help would be much appreciated. Thank you!
I tried to explain it via the visualization below.
Best Answers
-
Try something like this:
=IFERROR(INDEX(COLLECT([Lab Temp Column]:[Lab Temp Column], Type:Type, @cell = "LAB", Date:Date, @cell = Date@row, [LAB Number]:[LAB Number], @cell = [LAB Number]@row), 1), 0) - IFERROR(INDEX(COLLECT([Desk Temp Column]:[Desk Temp Column], Type:Type, @cell = "Desktop", Date:Date, @cell = Date@row, [LAB Number]:[LAB Number], @cell = [LAB Number]@row), 1), 0)
-
You missed the Type:Type range in each of the COLLECT functions. That is where we specify to pull the "LAB" for the first and the "Desktop" for the second.
Answers
-
Try something like this:
=IFERROR(INDEX(COLLECT([Lab Temp Column]:[Lab Temp Column], Type:Type, @cell = "LAB", Date:Date, @cell = Date@row, [LAB Number]:[LAB Number], @cell = [LAB Number]@row), 1), 0) - IFERROR(INDEX(COLLECT([Desk Temp Column]:[Desk Temp Column], Type:Type, @cell = "Desktop", Date:Date, @cell = Date@row, [LAB Number]:[LAB Number], @cell = [LAB Number]@row), 1), 0)
-
thank you for responding although I don't think it quite gets me there. i used the below formula:
=IFERROR(INDEX(COLLECT([Temperature Taken in Laboratory by Thermostat]:[Temperature Taken in Laboratory by Thermostat], Date:Date, @cell = Date@row, [LAB Number]:[LAB Number], @cell = [LAB Number]@row), 1), 0) - IFERROR(INDEX(COLLECT([Temperature taken from Metasys Desktop]:[Temperature taken from Metasys Desktop], Date:Date, @cell = Date@row, [LAB Number]:[LAB Number], @cell = [LAB Number]@row), 1), 0)
In the example below the variance should equal 4
-
You missed the Type:Type range in each of the COLLECT functions. That is where we specify to pull the "LAB" for the first and the "Desktop" for the second.
-
you are absolutely right! thank you. appreciate your help. 😁
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 67.2K Get Help
- 452 Global Discussions
- 155 Industry Talk
- 505 Announcements
- 5.4K Ideas & Feature Requests
- 85 Brandfolder
- 156 Just for fun
- 81 Community Job Board
- 514 Show & Tell
- 34 Member Spotlight
- 2 SmartStories
- 308 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!