Adding blank spaced to unused cells

wmtsub

Active Member
Joined
Jun 20, 2018
Messages
322
Please, can anyone tell me why I can not get this to work?

ActiveSheet.Range("A2:Z50").Select
ActiveSheet.UsedRange.SpecialCells(xlBlanks).Value = " "
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
What exactly is not working?
 
Upvote 0
Maybe this?
Code:
ActiveSheet.Range("A2:Z50").SpecialCells(xlBlanks).Value = " "

But a better question may be, why do you need to do this?
I have a feeling that this part of something bigger, and there may be other better ways to accomplish your ultimate goal.
 
Last edited:
Upvote 0
I am not sure why but that does not work either it just highlights the line of code, just like the first one.
Might it hav esomething to do wiothj conditional formating on the page?
 
Upvote 0
Try posting all of your code.

And can you answer the question I asked?
But a better question may be, why do you need to do this?
I have a feeling that this part of something bigger, and there may be other better ways to accomplish your ultimate goal.
 
Upvote 0
Do you get any error messages?
 
Upvote 0
As requested by Joe4, can you supply the complete code & explain what you are trying to do?
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,831
Members
449,190
Latest member
rscraig11

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