Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable value from named cell
I need to enhance the following code from JE Mcgimpsey (if not mistaken). nt.
The 4992 is to be made variable, ie. value from a cell named RowCount which has the formula =Rows(). Dim i As Long For i = 2 To 4992 Step 26 Cells(i, 18).Resize(1, 30).Value = _ Cells(i + 25, 18).Resize(1, 30).Value Next i End Sub Any assistance will be appreciated. Thank you -- Robert |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable value from named cell
Hi Robert,
Try: Dim i As Long For i = 2 To Range("RowCount").Value Step 26 Cells(i, 18).Resize(1, 30).Value = _ Cells(i + 25, 18).Resize(1, 30).Value Next i --- Regards, Norman "Robert" wrote in message ... I need to enhance the following code from JE Mcgimpsey (if not mistaken). nt. The "4992" is to be made variable, ie. value from a cell named "RowCount" which has the formula "=Rows()". Dim i As Long For i = 2 To 4992 Step 26 Cells(i, 18).Resize(1, 30).Value = _ Cells(i + 25, 18).Resize(1, 30).Value Next i End Sub Any assistance will be appreciated. Thank you -- Robert |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Variable value from named cell
Thank you Norman. Have tested and incorporated.
-- Robert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SUMPRODUCT using an absolute value or a named variable | Excel Discussion (Misc queries) | |||
Variable names for named range | Excel Discussion (Misc queries) | |||
DDE linking with variable from named cell! | Links and Linking in Excel | |||
referencing a named range using a variable | Excel Programming | |||
Can A Named Range Be A Variable? | Excel Programming |