ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Read cell value with a macro (https://www.excelbanter.com/excel-programming/351391-read-cell-value-macro.html)

jbuthmann

Read cell value with a macro
 

I tried to record a macro to read the cell value of the active cell.
The macro recorded the actual value of the cell I had selected at the
time. So if I select a different cell and run the macro it still reads
the same constant value as when I recorded it the first time. Example:
ActiveCell.FormulaR1C1 = "212"

I want it to read the value of the cell I have selected as a variable
and not a constant. I have looked through the help files but I must
not be asking the right questions. Can anybody set me straight?


--
jbuthmann
------------------------------------------------------------------------
jbuthmann's Profile: http://www.excelforum.com/member.php...o&userid=30811
View this thread: http://www.excelforum.com/showthread...hreadid=504729


Norman Jones

Read cell value with a macro
 
Hi J,

Try:

ActiveCell.value


---
Regards,
Norman



"jbuthmann" wrote
in message ...

I tried to record a macro to read the cell value of the active cell.
The macro recorded the actual value of the cell I had selected at the
time. So if I select a different cell and run the macro it still reads
the same constant value as when I recorded it the first time. Example:
ActiveCell.FormulaR1C1 = "212"

I want it to read the value of the cell I have selected as a variable
and not a constant. I have looked through the help files but I must
not be asking the right questions. Can anybody set me straight?


--
jbuthmann
------------------------------------------------------------------------
jbuthmann's Profile:
http://www.excelforum.com/member.php...o&userid=30811
View this thread: http://www.excelforum.com/showthread...hreadid=504729





All times are GMT +1. The time now is 05:22 PM.

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