Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I get the value of the cell with row = 7 and column = 2 (that would
be the value of the cell "B2") in VBA? I have made a function where I calculate which cell is holding the relevant data - and now I just want to get to that data once I know the row and column of the cell. And how if the cell is on a different page in my spreadsheet? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
msgbox cells(7,2).value
-- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... How do I get the value of the cell with row = 7 and column = 2 (that would be the value of the cell "B2") in VBA? I have made a function where I calculate which cell is holding the relevant data - and now I just want to get to that data once I know the row and column of the cell. And how if the cell is on a different page in my spreadsheet? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks!
And what if the cell is on a different page than the cell making the reference? I.e. how do I adress a cell on a specific page? "Don Guillett" wrote: msgbox cells(7,2).value -- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... How do I get the value of the cell with row = 7 and column = 2 (that would be the value of the cell "B2") in VBA? I have made a function where I calculate which cell is holding the relevant data - and now I just want to get to that data once I know the row and column of the cell. And how if the cell is on a different page in my spreadsheet? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
...Thanks again - just found it myself...
Here's a more tricky one: How do I copy the cell-formatting from one cell to another through VBA? I have the row and column of both cells - and want one's formatting to be a copy of the other. "Don Guillett" wrote: msgbox sheets("othersheetnamehere").cells(7,2).value -- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... Thanks! And what if the cell is on a different page than the cell making the reference? I.e. how do I adress a cell on a specific page? "Don Guillett" wrote: msgbox cells(7,2).value -- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... How do I get the value of the cell with row = 7 and column = 2 (that would be the value of the cell "B2") in VBA? I have made a function where I calculate which cell is holding the relevant data - and now I just want to get to that data once I know the row and column of the cell. And how if the cell is on a different page in my spreadsheet? |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The macro recorder is your friend. Record a macro while doing it manually
-- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... ..Thanks again - just found it myself... Here's a more tricky one: How do I copy the cell-formatting from one cell to another through VBA? I have the row and column of both cells - and want one's formatting to be a copy of the other. "Don Guillett" wrote: msgbox sheets("othersheetnamehere").cells(7,2).value -- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... Thanks! And what if the cell is on a different page than the cell making the reference? I.e. how do I adress a cell on a specific page? "Don Guillett" wrote: msgbox cells(7,2).value -- Don Guillett Microsoft MVP Excel SalesAid Software "RSunday" wrote in message ... How do I get the value of the cell with row = 7 and column = 2 (that would be the value of the cell "B2") in VBA? I have made a function where I calculate which cell is holding the relevant data - and now I just want to get to that data once I know the row and column of the cell. And how if the cell is on a different page in my spreadsheet? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing Options | Excel Discussion (Misc queries) | |||
Code to copy the formulae of one cell to all the cell in the rangewith the specific cell and columnnumber changing | Excel Discussion (Misc queries) | |||
Populate a cell if values in cell 1 and cell 2 match cell 3 and 4 | Excel Worksheet Functions | |||
NEED VBA TO SELECT A CELL; NOTE THE CELL VALUE;COPYADJ CELL;FIND CELL VALUE IN A RANGE AND SO ON | Excel Programming | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) |