Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 90244

How do I return an address from a range of cells in Excel, based on dynamically changing data?

$
0
0

I am trying to return a specific cell address from a range of cells, where the cell address I need contains specific data.

So in my range (A1:O15) my user types in a number. I check to see if that number appears in the range, and want the cell address returned. So far I have this:

=IF(COUNTIF(A1:O15,Q19)>0,SUBSTITUTE(ADDRESS(ROW(),COLUMN()),"$",""),"")

Q19 is the cell which contains the text I want to search for in the range. This returns the value of the cell I have the formula typed into. I tried another way in which I added in the range to the Row and Column functions. In this case I get the first cell in the range, whether or not the data is there:

=INDIRECT(IF(A1:O15=Q19,ADDRESS(ROW(1:15),COLUMN(A:O)),""))

Ideally I would be able to repeat this formula so that it can recognise the numbers 1-30 in the range of cells, and tell me which cell each number is in.

How do I get the exact cell address returned?


Viewing all articles
Browse latest Browse all 90244


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>