ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get row and column numbers (https://www.excelbanter.com/excel-programming/300188-get-row-column-numbers.html)

JohnZim

get row and column numbers
 
Hi,

I have a table of values in Excel and I used VLookUp to
get to a certain cell in the table. I am trying to write a
function that will sum up the value in the chosen cell (I
chose this cell using VLookUp) and the cell value directly
under the chosen cell.
I am assuming I need to first get the cell address of the
chosen cell and then use "Offset" to select the cell under
it but I do not know how to get the cell address of the
chosen cell. Can you help?

Bob Phillips[_6_]

get row and column numbers
 
John,

I think you need Match and Index.

You get the value off the cell by VLOOKUP, and say you store that value in
A1, and the column looked into was G1:G20, then you use

=INDEX(G1:G20,MATCH(A1,G1:G20,0)+1)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"JohnZim" wrote in message
...
Hi,

I have a table of values in Excel and I used VLookUp to
get to a certain cell in the table. I am trying to write a
function that will sum up the value in the chosen cell (I
chose this cell using VLookUp) and the cell value directly
under the chosen cell.
I am assuming I need to first get the cell address of the
chosen cell and then use "Offset" to select the cell under
it but I do not know how to get the cell address of the
chosen cell. Can you help?





All times are GMT +1. The time now is 05:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com