Custom format cell to consider dash as zero in excel

adpatel

New Member
Joined
May 30, 2019
Messages
42
Office Version
  1. 2016
Platform
  1. Windows
I import data from web external query in excel in which zero value represented as dash, to further calculation on this I need to consider this dash as zero
for that I have macro to convert dash to zero but, data gets refreshed every 5 min. so I need to run that replacement macro every 5 min.
instead of this I want to do is,apply format cell in which dash will be considered as zero and I will import data by selecting preserve format, so no need to run replacement macro every 5 min.
So pls let me know custom format cell in which positive value ll be consider as positive,negative as negative but dashes as zero
thank you.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
A custom format does not change the underlying value in the cell. So if the dash is causing a calculation problem, custom formatting won't help.
Perhaps if you tell us about the "further calculation", that can possibly be modified to treat the dashes as zero without actually changing them.
 
Upvote 0
OK, I got your point.
I am 1st coping this data to another range and then I use the copied data and new refreshed data for comparision
 
Upvote 0
So how do the dashes impact on that comparison?

Perhaps you could show us a small set of dummy sample data that shows 'current' & 'previous' data and how you want them compared?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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