Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Strange Request

I am using this formula successfully:

Set rng = Cells(6, 1).Resize(1, 1)
For i = 49 To 5000 Step 43
Set rng = Union(rng, Cells(i, 6).Resize(1, 1))
Next
rng.EntireRow.Select

It selects row 6, 49, then every 43rd row there after. It selects the
entire row, I want it to select just a range of all those rows, but only
columsn A - F What change do I need to make? I'm asuming that I have to
change the "rng.EntireRow.Select " to some kind of column range, but I'm not
sure what. THANKS!!!!


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Strange Request

How about this:

rng.resize(1,6).select

"bodhisatvaofboogie" wrote:

I am using this formula successfully:

Set rng = Cells(6, 1).Resize(1, 1)
For i = 49 To 5000 Step 43
Set rng = Union(rng, Cells(i, 6).Resize(1, 1))
Next
rng.EntireRow.Select

It selects row 6, 49, then every 43rd row there after. It selects the
entire row, I want it to select just a range of all those rows, but only
columsn A - F What change do I need to make? I'm asuming that I have to
change the "rng.EntireRow.Select " to some kind of column range, but I'm not
sure what. THANKS!!!!


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Strange Request

wonderful, THANKS!!! Can't believe I missed that. I think I've been
staring at this macro too long...time to take a break, I'm starting to ignore
things. HA!!!

"Paul Mathews" wrote:

How about this:

rng.resize(1,6).select

"bodhisatvaofboogie" wrote:

I am using this formula successfully:

Set rng = Cells(6, 1).Resize(1, 1)
For i = 49 To 5000 Step 43
Set rng = Union(rng, Cells(i, 6).Resize(1, 1))
Next
rng.EntireRow.Select

It selects row 6, 49, then every 43rd row there after. It selects the
entire row, I want it to select just a range of all those rows, but only
columsn A - F What change do I need to make? I'm asuming that I have to
change the "rng.EntireRow.Select " to some kind of column range, but I'm not
sure what. THANKS!!!!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default Strange Request

Whoops, sorry, I meant:

rng.Cells(1, 1).Resize(1, 6).Select

"bodhisatvaofboogie" wrote:

I am using this formula successfully:

Set rng = Cells(6, 1).Resize(1, 1)
For i = 49 To 5000 Step 43
Set rng = Union(rng, Cells(i, 6).Resize(1, 1))
Next
rng.EntireRow.Select

It selects row 6, 49, then every 43rd row there after. It selects the
entire row, I want it to select just a range of all those rows, but only
columsn A - F What change do I need to make? I'm asuming that I have to
change the "rng.EntireRow.Select " to some kind of column range, but I'm not
sure what. THANKS!!!!


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Strange Request

I think what you really want is:

Set rng = Cells(6, 1)
For i = 49 To 5000 Step 43
Set rng = Union(rng, Cells(i, 1))
Next
Intersect(rng.EntireRow,Range("A:F")).Delete Shift:=xlup



--
Regards,
Tom Ogilvy


"bodhisatvaofboogie" wrote:

wonderful, THANKS!!! Can't believe I missed that. I think I've been
staring at this macro too long...time to take a break, I'm starting to ignore
things. HA!!!

"Paul Mathews" wrote:

How about this:

rng.resize(1,6).select

"bodhisatvaofboogie" wrote:

I am using this formula successfully:

Set rng = Cells(6, 1).Resize(1, 1)
For i = 49 To 5000 Step 43
Set rng = Union(rng, Cells(i, 6).Resize(1, 1))
Next
rng.EntireRow.Select

It selects row 6, 49, then every 43rd row there after. It selects the
entire row, I want it to select just a range of all those rows, but only
columsn A - F What change do I need to make? I'm asuming that I have to
change the "rng.EntireRow.Select " to some kind of column range, but I'm not
sure what. 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
Strange request: Counting cells and percentages jmj713 Excel Discussion (Misc queries) 4 November 6th 08 10:43 PM
sql.request teepee[_4_] Excel Programming 2 December 30th 05 01:34 PM
Request help Shetty Excel Programming 2 November 17th 05 10:38 AM
Strange request Automaticaly send spread sheet as an e-mail Gill Excel Programming 1 December 19th 04 06:30 AM
Strange Formula Request Steph[_3_] Excel Programming 5 October 28th 04 03:52 PM


All times are GMT +1. The time now is 08:19 PM.

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"