This is what im trying to get a macro to do if anyone can help put thi
into a VBA code it would be a big help to me.
Search Range A1:H1000 for any instances where there is a value i
column A and
adjacent cells in row B:H are blank cells.
When found set range from the cell in column A where the above criteri
were satisfied to the last cell in column H that has consecutive value
in it
(By this I mean that if there are say values in cells H3:H6 then cell
H7:H8 are blank and H9 has a value in it the macro would only selec
the range down to H6)
For this range that has been selected only copy rows within this rang
if they have a "Y" Value in column "I"
Now paste this into Sheet 2
Ensuring that there is a blank row above and below the group of dat
being pasted
eg,
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
Repeat this until the macro has gone down to row 1000
So in sheet two you would get your selected tables looking like this
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
In Sheet 2 Search Column A for any instances of the Word "Total" whe
found cut that row and paste it at the bottom of the table list so th
macro would look for the first 3 consecutive blank rows and when i
finds them it pastes any row with the word "total" in them one ro
after another.
So the when finished sheet 2 will look like this
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
BLANK ROW
XXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXX <-------DATA
XXXXXXXXXXXXXXXXXXX
BLANK ROW
BLANK ROW
BLANK ROW
TOTALXXXXXXXXXXXXXX
TOTALXXXXXXXXXXXXXX
TOTALXXXXXXXXXXXXXX<-------TOTAL DATA
TOTALXXXXXXXXXXXXXX
TOTALXXXXXXXXXXXXX
--
Vlad99
-----------------------------------------------------------------------
Vlad999's Profile:
http://www.excelforum.com/member.php...fo&userid=3358
View this thread:
http://www.excelforum.com/showthread.php?threadid=53366