VBA to remove standalone zeros

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
442
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,

Is there a way to remove all standalone zeros in columns R to Y so

from this
0​
0​
0​
0​
0​
0​
0​
18192.02​

to this
18192.02​

As you can see column Y also has a zero but this needs to stay as is not a standalone zero.

Thanks
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Use "Find and Replace", replacing 0 with nothing, being sure to select the "Match entire cell contents" option, i.e.
1706790122430.png

and clicking "Replace All".

If you want VBA code for this, turn on your Macro Recorder and record yourself doing this manually.
Then stop the Macro Recorder and view the code, and you will have the VBA code that you need!
 
Upvote 0
If it doesn't affect any calculations and you just don't want to show them you can format the cells to not show them:
[=0]"";General
 
Upvote 0

Forum statistics

Threads
1,215,373
Messages
6,124,548
Members
449,170
Latest member
Gkiller

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