Find column number in row

Cobber2008

New Member
Joined
Nov 29, 2020
Messages
28
Office Version
  1. 365
I’m trying to look from right to left in a row of Data but find a number that is less than another number and result the column number eg find find column number in a row range eg a5:A100 from right to left where the number is less than 7.5 then give me the column number of that cell. Preferablly not an array. Thanks.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Since you have 365 if you didn't want to use VBA you could just use this:
Excel Formula:
=IFERROR(COLUMN(XLOOKUP(TRUE,$A$5:$N$5<Q5,$A$5:$N$5,"not found",0,-1)),"not found")

If you wanted to use VBA do you want to start at row 5 and work your way down ?
Do you want to stop when it finds the first one ?
Where do you want the result especially if you want it to loop through all the rows ?
Will all the rows have the same number of columns ie can we use row 5 to work out how many columns to loop through ?
 
Upvote 0
Hey Alex thanks for your help. I ended up using this formula which if thinks works
Iferror(lookup(2/1/(al2:bm2>0)*(al2:bm2>=5)),(column(2:2)).0). Cheers
 
Upvote 0
Solution

Forum statistics

Threads
1,215,461
Messages
6,124,957
Members
449,200
Latest member
indiansth

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