VBA to Clear Negative Values with Negative Exponent

jski21

Board Regular
Joined
Jan 2, 2019
Messages
155
Office Version
  1. 2016
Platform
  1. Windows
Good morning Mr. Excel Team,

I think I have an unusual request. I work for a large governmental organization. I've made great strides in getting their data management and reporting up to speed. One issue I've come across is there is frequently large negative numbers in the data sets. The cell shows "0.00" however, if you select the cell, you can see the negative number carried out to 8, 9, sometimes 10 decimal places along with a negative exponent. An example would be -6.40284270048142E-10. I'm working towards getting this cleared up (easier said than done in a large govt. org.), but for all intents and purposes, I treat this field truly as 0 for analysis and reporting purposes. I find myself sorting the often large datasets from smallest to largest and copying/pasting all zero values with a true 0. Has anyone run across this?

My request is does anyone have/seen VBA code that would search for these values in a dataset and convert them to zero?

Thanks in advance for your advice and insight on this rather strange issue.


jski
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,224,828
Messages
6,181,204
Members
453,022
Latest member
RobertV1609

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