ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   extract cell reference in one formula and add it to another formul (https://www.excelbanter.com/excel-programming/312918-extract-cell-reference-one-formula-add-another-formul.html)

sommer

extract cell reference in one formula and add it to another formul
 
Does anyone know how to extract the row number of a cell reference in one
formula and add it to a formula in another cell? For example, A10 is the
active cell and it contains the formula ='DataSheet'!AB246. I would like to
extract the row number (246) from the formula in A1 and insert it into
another cell (D10) that contains the formula ='DataSheet'!BC(row number
246)*pi()/180+'DataSheet'!CA(row number 246)*.5

Thanks for your help! (Excel 2000)


John Green[_4_]

extract cell reference in one formula and add it to another formul
 
If there is only a single cell reference in the formula you can use:

RowNumber = ActiveCell.DirectPrecedents.Row

--
John Green
Sydney
Australia

"sommer" wrote in message
...
Does anyone know how to extract the row number of a cell reference in one
formula and add it to a formula in another cell? For example, A10 is the
active cell and it contains the formula ='DataSheet'!AB246. I would like

to
extract the row number (246) from the formula in A1 and insert it into
another cell (D10) that contains the formula ='DataSheet'!BC(row number
246)*pi()/180+'DataSheet'!CA(row number 246)*.5

Thanks for your help! (Excel 2000)





All times are GMT +1. The time now is 03:53 AM.

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