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

Okay, I'm trying to do something very strange, but I have to find a way to
get all the data in an orderly fashion. I want to do the following:

Seek the blank rows and select each cell one up from the blanks. For each
selection(essentially the last row of each set of data separated by a blank
row),

IF (Cell = 2) Then
Insert 28 rows

IF (Cell = 3) Then
Insert 27 rows

IF (Cell = 4) Then
Insert 26 rows

ETC.ETC....

That would make each grouping of data have the exact same amount of rows,
which is what I NEED to continue with my project. Need more clarification,
please ask. THANKS!!!!!!
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Difficult Question


nextblankrow=range("a1").end(xldown).row+1

so maybe this would work. not tested

range("a1").end(xldown).row+1.Resize(30 - Range("a1")).EntireRow.Insert


--
Don Guillett
SalesAid Software

"bodhisatvaofboogie" wrote in
message ...
Also, how do I input that into an If Statement? I tried to just do

If (Cell = 16) Then
ActiveCell.offset(-1).Resize(14 - Range("a1")).EntireRow.Insert
End If

But that didn't work

I know I'm missin somethin...


"Don Guillett" wrote:

IF?? I understand your question

ActiveCell.offset(-1).Resize(30 - Range("a1")).EntireRow.Insert
--
Don Guillett
SalesAid Software

"bodhisatvaofboogie" wrote
in
message ...
How do I get it to select the cells right above the blank ones?
Thanks!!!

"Don Guillett" wrote:

something like

Sub insertrowssize()
ActiveCell.Resize(30 - Range("a1")).EntireRow.Insert
End Sub
--
Don Guillett
SalesAid Software

"bodhisatvaofboogie"
wrote
in
message ...
Okay, I'm trying to do something very strange, but I have to find a
way
to
get all the data in an orderly fashion. I want to do the following:

Seek the blank rows and select each cell one up from the blanks.
For
each
selection(essentially the last row of each set of data separated by
a
blank
row),

IF (Cell = 2) Then
Insert 28 rows

IF (Cell = 3) Then
Insert 27 rows

IF (Cell = 4) Then
Insert 26 rows

ETC.ETC....

That would make each grouping of data have the exact same amount of
rows,
which is what I NEED to continue with my project. Need more
clarification,
please ask. 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
Difficult ------------- question woo Excel Discussion (Misc queries) 1 May 6th 07 04:23 AM
difficult question Wu Excel Discussion (Misc queries) 2 April 1st 07 03:10 PM
Difficult (at least to me) formula question darkwood Excel Worksheet Functions 5 December 29th 05 01:39 PM
Another very difficult question; sorry! Rob Hargreaves[_2_] Excel Programming 2 August 14th 05 06:09 PM
A difficult question filo666 Excel Programming 3 April 18th 05 05:24 PM


All times are GMT +1. The time now is 04:29 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"