Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

macro to copy & paste says cells "empty"

Status
Not open for further replies.

ch4meleon

Technical User
Jan 13, 2003
60
GB
Helps please...... :)
Im trying to copy and paste data from one worksheet "checklist" to another worksheet "action points"

i want the macro to look through all the rows 22 to 144 to see if the data in col D is "no" if so copy col A and H of that row to the action points sheet to next available row cols B and C.

I have -
If cells(x,d)=no then
and this keep coming up with an error telling me d is empty. Is this because the cells in col D all have listboxes with option yes/no ??? if so how do i get round this ??
Huge thanks in ant for any help !!! :)
 

Hi,

Take a look at the AutoFilter -- filter on Col D Criteria NO

Then copy 'n' paste in one fell swoop!

Skip,

[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue]
 
unfortunatley i need to automate it - there is an existing button to move bewteen worksheets as the tabs are hidden so i'd like to add the code to that ideally :)
thanks for the suggestion tho :)
 


Is ther anything stopping you from using the AutoFilter in your vb code?

Turn on your Macro Recorder and have at it!

Skip,

[glasses] [red]Be Advised![/red] For those this winter, caught in Arctic-like calamity, be consoled...
Many are cold, but few are frozen![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top