![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 5
|
In a macro I am currently writing, I have selected and copied an entire row on a spreadsheet. I need to assign the value of a certain cell in that row to a variable, and I can't find a way to get to it. For example, if row 10 was selected, and i had a variable x, and i wanted x to equal the value of cell C10, is there a way to do that?
|
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Monterrey, Mexico
Posts: 1,433
|
Not sure I understand, but to set a variable equal to a cell, do the following:
x=[c10].value or x=range("c10").value or x=cells(10,3).value or etc.
__________________
Kind regards, Al Chara |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|