Get row and column numbers for given searched value in Table or Range

monzer_yazigi

New Member
Joined
Mar 14, 2014
Messages
8
Office Version
  1. 365
Platform
  1. Windows
I have a large random data, given a search value as input, I need to:
1. search for its' next greater value within the random data
2. return the row and column of the next greater value

The first part is solved by the formula:
LARGE(A1:H1000,COUNTIF(A1:H1000,">=" & K1))​
where:
- A1:H1000 is the range of random data​
- K1: Search value​
The problem is with the second question. Not able to figure it!!!

I know I can use VBA but I am trying to avoid that.

Any advise?

Thanks
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Once you work our your max value, you can use this formula in C1



=ADDRESS(SUMPRODUCT(--((A5:F7=B1))*ROW(A5:A7)),SUMPRODUCT(--((A5:F7=B1))*COLUMN(A5:F5)))



1626770579724.png


Kind regards

Saba
 
Upvote 0
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can values occur more than once?
 
Upvote 0
Once you work our your max value, you can use this formula in C1



=ADDRESS(SUMPRODUCT(--((A5:F7=B1))*ROW(A5:A7)),SUMPRODUCT(--((A5:F7=B1))*COLUMN(A5:F5)))



View attachment 43101

Kind regards

Saba
Thank you. It worked perfectly. It fail only if there are repeated values as questioned by Fluff.
My data does not have repeated values anyway.
 
Upvote 0
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Also can values occur more than once?
Thanks for the note. Done.
No it does not repeat. The offered solution by Saba worked correctly. However, it fails when repeated values are there.
For me, since my data does not have repeated values, the solution worked well.
 
Upvote 0
Glad it works & thanks for updating your account.
 
Upvote 0

Forum statistics

Threads
1,214,414
Messages
6,119,373
Members
448,888
Latest member
Arle8907

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