#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Name Ranges Steve Excel Discussion (Misc queries) 0 January 22nd 10 09:57 PM
how copy formula that contains ranges so ranges do not overlap Patty Excel Worksheet Functions 1 November 20th 08 04:15 PM
Like 123, allow named ranges, and print named ranges WP Excel Discussion (Misc queries) 1 April 8th 05 06:07 PM
Ranges Mona Excel Discussion (Misc queries) 1 December 17th 04 06:23 AM
named ranges - changing ranges with month selected gr8guy Excel Programming 2 May 28th 04 04:50 AM


All times are GMT +1. The time now is 06:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"