Horizontal Return

savvysum

New Member
Joined
Jun 22, 2022
Messages
19
Office Version
  1. 365
Platform
  1. MacOS
Hi I need to horizontally look at a data set & return the date of the most recent sale.
in this example, 2 sales occurred in April 2024, so cell A2 returns 4/30/2024.
A3 returns 1/31/2024 b/c 3 sales most recently occurred in Jan 2024.

A1
return Formula06/30/202405/31/202404/30/202403/31/202402/29/202401/31/2024
4/30/2024002010
1/31/2024000003

 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Perhaps this:
Book1
ABCDEFG
1return Formula6/30/20245/31/20244/30/20243/31/20242/29/20241/31/2024
24/30/2024002010
31/31/2024000003
Sheet3
Cell Formulas
RangeFormula
A2:A3A2=INDEX(FILTER($B$1:$G$1,B2:G2>0,"-"),1)
 
Upvote 0
I'm receiving this error when I plug the formula to A2
ErrorFILTER has mismatched range sizes. Expected row count: 1. column count: 6. Actual row count: 1, column count: 1.
 
Upvote 0
I'm receiving this error when I plug the formula to A2
ErrorFILTER has mismatched range sizes. Expected row count: 1. column count: 6. Actual row count: 1, column count: 1.
Did you retype the formula or copy and paste?
 
Upvote 0
One more option.
Book1
ABCDEFG
1return Formula6/30/20245/31/20244/30/20243/31/20242/29/20241/31/2024
24/30/2024002010
31/31/2024000003
Sheet1
Cell Formulas
RangeFormula
A2:A3A2=XLOOKUP(TRUE,B2:G2<>0,$B$1:$G$1,"-")
 
Upvote 0
One more option.
Book1
ABCDEFG
1return Formula6/30/20245/31/20244/30/20243/31/20242/29/20241/31/2024
24/30/2024002010
31/31/2024000003
Sheet1
Cell Formulas
RangeFormula
A2:A3A2=XLOOKUP(TRUE,B2:G2<>0,$B$1:$G$1,"-")
I was trying XLOOKUP first, but that didn't occur to me how to look up the value.
 
Upvote 0
ErrorFILTER has mismatched range sizes. Expected row count: 1. column count: 6. Actual row count: 1, column count: 1.
Is this for Excel or for Google Sheets?
 
Upvote 0

Forum statistics

Threads
1,220,965
Messages
6,157,119
Members
451,398
Latest member
rjsteward

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top