Copy Specific Range

User avatar
HansV
Administrator
Posts: 78575
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Copy Specific Range

Post by HansV »

No idea - that doesn't happen when I try your workbook.
Best wishes,
Hans

User avatar
adam
SilverLounger
Posts: 2347
Joined: 23 Feb 2010, 12:07

Re: Copy Specific Range

Post by adam »

No idea - that doesn't happen when I try your workbook.
When the accession number is written as A0002 in the cell "B2" and when the sex is changed to either Male or Female the text "reference range" in the row 7 under the category Vegetable remains while the text "reference range" in rows 14 & 18 gets cleared.

I'm having the workbook that I have posted.
Best Regards,
Adam

User avatar
HansV
Administrator
Posts: 78575
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Copy Specific Range

Post by HansV »

Ah, yes.

You also have a line

Range("D8:D1000").ClearContents

This obviously doesn't clear row 7.
Best wishes,
Hans

User avatar
adam
SilverLounger
Posts: 2347
Joined: 23 Feb 2010, 12:07

Re: Copy Specific Range

Post by adam »

At last, thanks for pointing out the line, Range("D8:D1000").ClearContents

I have changed it to Range("D8").ClearContents
Best Regards,
Adam