Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
copy cell based on condition where row numbers are not the same.
Hi everyone Hope this is the correct forum for this question and if not - pleas 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 o column B (size) checks if the content is an F followed by 4 digits. I yes, copy the cell and continue down column b until it reaches group. then need it to go right to location and paste in the F#. It should the 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 unti it finds group. and moves to the right, pastes it etc, then continue down column B. I can't create a simple macro as the numbers of rows i each group varies. If anyone can offer help or advice i would be mos grateful. Thanks in advance to anyone who can help. subtotal for is i column A and group is in column B. type size weight number location F1234 subtotal for group F1234 F1241 subtotal for grou -- john gibso ----------------------------------------------------------------------- john gibson's Profile: http://www.excelforum.com/member.php...fo&userid=3718 View this thread: http://www.excelforum.com/showthread.php?threadid=56895 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy and Paste based on Condition | Excel Discussion (Misc queries) | |||
Assign auto numbers based on a condition | Excel Worksheet Functions | |||
Sum largest numbers based on condition | Excel Worksheet Functions | |||
Copy Row based on a condition | Excel Worksheet Functions | |||
How to copy only some rows from range based on condition? | Excel Programming |