Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ranges
All -
I have two columns; Range1 and Range2 respectively. If for example, Range1 has a value of 20 and Range2 has a value of 44 - I need to take all the values between those two and put them into a new worksheet so it will have one column that has 20, 21, 22, 23, 24 etc. as the records. It then needs to go to the next row in Sheet 1 - and look at the Range1 and Range2 and transpose all those values in the new worksheet. Can anybody advise? Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Ranges
set sh = Activesheet
Application.DisplayAlerts = False On Error Resume Next Worksheets("Output").Delete On Error goto 0 Application.DisplayAlerts = True Worksheets.Add Activesheet.Name = "Output" set sh1 = Worksheets("Output") sh.Activate lOff = Range2.Column - Range1.Column rw = 1 for each cell in Range1 lStart = cell.Value lStop = cell.offset(0,lOff).Value for i = lStart to lStop sh1.cells(rw,1).Value = i rw = rw + 1 Next Next -- Regards, Tom Ogilvy "Mona" wrote in message ... All - I have two columns; Range1 and Range2 respectively. If for example, Range1 has a value of 20 and Range2 has a value of 44 - I need to take all the values between those two and put them into a new worksheet so it will have one column that has 20, 21, 22, 23, 24 etc. as the records. It then needs to go to the next row in Sheet 1 - and look at the Range1 and Range2 and transpose all those values in the new worksheet. Can anybody advise? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Name Ranges | Excel Discussion (Misc queries) | |||
how copy formula that contains ranges so ranges do not overlap | Excel Worksheet Functions | |||
Like 123, allow named ranges, and print named ranges | Excel Discussion (Misc queries) | |||
Ranges | Excel Discussion (Misc queries) | |||
named ranges - changing ranges with month selected | Excel Programming |