Formula to format worksheet to numbers and replace empty cells with 0

vbanovice123

Board Regular
Joined
Apr 15, 2011
Messages
91
Hi,

I would like to make my macro work automatically without having to do the below three manual steps:
1) Delete titles, text data and column headers that are text
2) Format the sheet containing percent and text data to number
3) Replace blank cells with 0

I read that there is a way to determine the data type for nulls/empty cells within the sheet as below:

IsEmpty(variable) and IsNull(variable) . Is this so and how can I apply it to the macro.

Also if I need to reformat cells to a number , can I use the format funtion?

The manual steps used above defeats the purpose of the macro as it is not full automated.

Any help is greatly appreciated.

Regards,
Anita
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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