View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
scott scott is offline
external usenet poster
 
Posts: 577
Default copy cell based on condition where row numbers are not the same.

Hello,

Have you tried using an array? it might be easier. As you loop through
your data you can have an array read whichever values match the criteria.
then when you finish going through all the data have the array dump all the
data wherever you want.

Cheers,

Scott

"john gibson" wrote:


Hi everyone

Hope this is the correct forum for this question and if not - please
accept my apologies. I have shown a small extract from a spreadsheet.
What I need is a macro that I can run which goes first to the top of
column B (size) checks if the content is an F followed by 4 digits. If
yes, copy the cell and continue down column b until it reaches group. I
then need it to go right to location and paste in the F#. It should then
move left again, back to column B on the same row and continue checking.
Each time it finds an F#, it copies it and proceeds down column B until
it finds group. and moves to the right, pastes it etc, then continues
down column B. I can't create a simple macro as the numbers of rows in
each group varies. If anyone can offer help or advice i would be most
grateful. Thanks in advance to anyone who can help. subtotal for is in
column A and group is in column B.

type size weight number location
F1234






subtotal for group F1234

F1241


subtotal for group


--
john gibson
------------------------------------------------------------------------
john gibson's Profile: http://www.excelforum.com/member.php...o&userid=37185
View this thread: http://www.excelforum.com/showthread...hreadid=568956