Copy Range with Blank formula still shows in COUNT

uk747

Well-known Member
Joined
Jul 20, 2011
Messages
843
Office Version
  1. 365
Platform
  1. Windows
Hi

I'm copying Ranges using VBA or even manually and even if the result of a formula in the range is "" when pasted it shows up in the COUNT When I select the Column.

Only way to stop it showing in the Count is Filter the Column for Blanks, select them all and press delete

e.g.
Cell B2 is a, Cell B3 is b, Cell B4 is = =IF(B2="a","",B2)

When I highlight Column B the Count is 3 which is fine 2 values and a formula
However when I copy B2:B4 and Paste as Values in D2, when I highlight Colum D the count is still 3 even though Cell D4 shows as a blank when you select it. If I click on D4 and Press delete it shows as 2.

So when I copy Paste the Blank which is the result of a formula how can I paste so that it wont show up in a count when column is Selected

Code used in example above
VBA Code:
Range("B2:B4").Copy
Range("D2").PasteSpecial Paste:=xlPasteValues

Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top