Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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


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
Copy and Paste based on Condition EJ Excel Discussion (Misc queries) 1 June 27th 07 11:17 PM
Assign auto numbers based on a condition Lisa Excel Worksheet Functions 8 October 19th 06 02:46 PM
Sum largest numbers based on condition Daniel Bonallack Excel Worksheet Functions 6 August 15th 06 08:23 PM
Copy Row based on a condition [email protected] Excel Worksheet Functions 1 April 19th 06 06:05 PM
How to copy only some rows from range based on condition? [email protected][_2_] Excel Programming 2 January 30th 06 01:04 AM


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