Forum Discussion
Chastitycaprice
Apr 06, 2024Copper Contributor
How do I get the Total Sales data to match the latest monthly sales data available in each row?
Hello everyone, I would like the last column below (Total Sales $) to match the latest monthly sales data for each row, ignoring the purchase qty column information (Example: Jan Pur Qty, Feb Pu...
- Apr 09, 2024
Use HSTACK:
=XLOOKUP(1, (HSTACK(N4, P4, R4, T4, V4) <> "") * (HSTACK(N4, P4, R4, T4, V4) <> 0), HSTACK(N4, P4, R4, T4, V4), , , -1)
Chastitycaprice
Copper Contributor
Thank you! I was able to get the result I wanted primarily.
I wanted to hide the zeros and the blanks. The below formula did the job.
=XLOOKUP(1,(N4:V4<>"")*(N4:V4<>0),N4:V4,,,-1)
Right now, I'm having issues with replacing the N4:V4 with the specific cells that I want to pull data from N4, P4, R4, T4, V4. I want to avoid specific cells.
How do I insert the above cells using commas into the below formula? I tried to this multiple times but I'm getting errors. I've attached sample data.
=XLOOKUP(1,(N4:V4<>"")*(N4:V4<>0),N4:V4,,,-1)
rachel
Apr 09, 2024Steel Contributor
Use HSTACK:
=XLOOKUP(1, (HSTACK(N4, P4, R4, T4, V4) <> "") * (HSTACK(N4, P4, R4, T4, V4) <> 0), HSTACK(N4, P4, R4, T4, V4), , , -1)