ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA: how to assign or pick a value in other Cell (https://www.excelbanter.com/excel-discussion-misc-queries/46227-vba-how-assign-pick-value-other-cell.html)

Sunantoro

VBA: how to assign or pick a value in other Cell
 
I'm new in VB.
To pick up a value from other Cell, what I currently know is by using
'Offset (Row,Colum)' to go to that Cell and then assigning the the Active
Cell's Value in a Counter. This way is rather awkward if many cells are
involved.
What is the easier way to do such, ie not by "Moving Around"?
Thanks,
SUNAN

Rowan

one way:

Counter = sheets("Sheet1").cells(5,2).value

sets counter to be the value of cell B5

Hope this helps
Rowan

Sunantoro wrote:
I'm new in VB.
To pick up a value from other Cell, what I currently know is by using
'Offset (Row,Colum)' to go to that Cell and then assigning the the Active
Cell's Value in a Counter. This way is rather awkward if many cells are
involved.
What is the easier way to do such, ie not by "Moving Around"?
Thanks,
SUNAN


Sunantoro

Thanks Rowan,
It seems to be the answer. I'll try it later.
SUNAN

"Rowan" wrote:

one way:

Counter = sheets("Sheet1").cells(5,2).value

sets counter to be the value of cell B5

Hope this helps
Rowan

Sunantoro wrote:
I'm new in VB.
To pick up a value from other Cell, what I currently know is by using
'Offset (Row,Colum)' to go to that Cell and then assigning the the Active
Cell's Value in a Counter. This way is rather awkward if many cells are
involved.
What is the easier way to do such, ie not by "Moving Around"?
Thanks,
SUNAN




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

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