Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a Macro to Range Cells, from the contents of another Cell.
Hi Guys.
A Workbook containing 3 sheets. Using the formula Range("A1:D2").Select, can the data "A1" and "D2" inside the formula be substituted with the contents of another cell? For example: Using the formula Range("A1:D2").Select to select data from sheet 1, replace "A1" & "D2" from the cell "J4" & "K4" in sheet 2, which has the correct ranges, and then the result pasted in sheet 3. Sheet 2 has the data ranges required, and they change frequently. Is this possible? Can an automation be done to range formulas with information from another cell? Any help is much appreciated. Denis *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Create a Macro to Range Cells, from the contents of another Cell.
Hi Denis,
You can use a value on Sheet2 in your range. Simply reference the cell explicitly or assign the cells value to a variable e.g Sheet1.Range(Sheet2.Cells(1,1).Text).Select or myRange=Sheet2.Cells(1,1).Text Sheet1.Range(myRange).Select Sheet1 would need to be the active sheet. Hope this helps, Mike "Denis Lory" wrote: Hi Guys. A Workbook containing 3 sheets. Using the formula Range("A1:D2").Select, can the data "A1" and "D2" inside the formula be substituted with the contents of another cell? For example: Using the formula Range("A1:D2").Select to select data from sheet 1, replace "A1" & "D2" from the cell "J4" & "K4" in sheet 2, which has the correct ranges, and then the result pasted in sheet 3. Sheet 2 has the data ranges required, and they change frequently. Is this possible? Can an automation be done to range formulas with information from another cell? Any help is much appreciated. Denis *** Sent via Developersdex http://www.developersdex.com *** |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to clear range contents when cell contents are changed by us | Excel Programming | |||
Create a macro to run autofilter based on contents of 2 cells | Excel Programming | |||
how do i create a macro that would check the contents of cells | Excel Discussion (Misc queries) | |||
how do i create a macro that would check the contents of cells | Excel Discussion (Misc queries) | |||
Adding contents of one cell to a range of cells. | Excel Worksheet Functions |