Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Strange request: Counting cells and percentages | Excel Discussion (Misc queries) | |||
sql.request | Excel Programming | |||
Request help | Excel Programming | |||
Strange request Automaticaly send spread sheet as an e-mail | Excel Programming | |||
Strange Formula Request | Excel Programming |