ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   get the value of a formula in cell B1 into cell A1 without changing my current cell selection (https://www.excelbanter.com/excel-programming/375610-get-value-formula-cell-b1-into-cell-a1-without-changing-my-current-cell-selection.html)

News[_4_]

get the value of a formula in cell B1 into cell A1 without changing my current cell selection
 
Can someone tell me how in an Excel macro I can get the value of a formula
in cell B1 into cell A1 without changing my current cell selection?

THANKS!
Mike



Jim Thomlinson

get the value of a formula in cell B1 into cell A1 without changin
 
You can give this a try... It does not change the cell selection nor does it
require sheet 1 to even be the active sheet...

Sheets("Sheet1").Range("A1").value = Sheets("Sheet1").Range("B1").value
--
HTH...

Jim Thomlinson


"News" wrote:

Can someone tell me how in an Excel macro I can get the value of a formula
in cell B1 into cell A1 without changing my current cell selection?

THANKS!
Mike




Charles Chickering

get the value of a formula in cell B1 into cell A1 without cha
 
Just use .Formula instead of .Value in both instances.
--
Charles Chickering

"A good example is twice the value of good advice."


"Jim Thomlinson" wrote:

You can give this a try... It does not change the cell selection nor does it
require sheet 1 to even be the active sheet...

Sheets("Sheet1").Range("A1").value = Sheets("Sheet1").Range("B1").value
--
HTH...

Jim Thomlinson


"News" wrote:

Can someone tell me how in an Excel macro I can get the value of a formula
in cell B1 into cell A1 without changing my current cell selection?

THANKS!
Mike




News[_4_]

get the value of a formula in cell B1 into cell A1 without changin
 
Wow! Things are easy when you know stuff. Thanks Jim!
Mike

"Jim Thomlinson" wrote in message
...
You can give this a try... It does not change the cell selection nor does
it
require sheet 1 to even be the active sheet...

Sheets("Sheet1").Range("A1").value = Sheets("Sheet1").Range("B1").value
--
HTH...

Jim Thomlinson


"News" wrote:

Can someone tell me how in an Excel macro I can get the value of a
formula
in cell B1 into cell A1 without changing my current cell selection?

THANKS!
Mike







All times are GMT +1. The time now is 06:40 PM.

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