ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy value in formula (https://www.excelbanter.com/excel-programming/284587-copy-value-formula.html)

Jonny[_2_]

Copy value in formula
 
How would i copy a the value of a formula to the last
empty cell in a row in vba?

Tom Ogilvy

Copy value in formula
 
I assume you mean the first empty cell to the right of the data.

You didn't specify what cell contains the formula or which row, so I am
assuming the active cell and the value is placed in that row to the first
empty cell after the data.

set rng = cells(activeCell.row,256).end(xlToLeft)(1,2)
rng.value = activecell.Value

--
Regards,
Tom Ogilvy

"Jonny" wrote in message
...
How would i copy a the value of a formula to the last
empty cell in a row in vba?





All times are GMT +1. The time now is 03:35 PM.

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