View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike M[_10_] Mike M[_10_] is offline
external usenet poster
 
Posts: 1
Default Copy-Paste while looping

I'm having trouble getting this one to work.
Sheet1 is collecting summary information.
Sheet2 contains 2 columns of data - D and E. Column D contains the
relavent data, column E contains a TRUE/FALSE flag to indicate if the
data is required.

I need to create a macro on Sheet1, that checks Sheet2 Column E5, if
TRUE copy D5 to Sheet1 C17, LOOP to E6, if FALSE LOOP to E6.

Continue until next loop is empty.

Eg
Sheet2
D5 Tom E5 FALSE
D6 Dick E6 FALSE
D7 Harry E7 TRUE
D8 Sam E8 TRUE
D9 Jack E9 FALSE
D10 Mary E10 TRUE
D11 Sue E11 FALSE

Would give
Sheet1
C17 Harry
C18 Sam
C19 Mary

This created list on Sheet1 needs to be continuous, without any spaces
that may be caused by FALSE's.

Macro would continue to loop checking for sheet 2 TRUE's, making a list
in Sheet1 until there is no more TRUE of FALSE in Column E on Sheet2.

Note, the length of Sheet2 column E is fixed, so a Range (E5:E155)
could also be used.

Any thoughts on this are appreciated.


---
Message posted from http://www.ExcelForum.com/