adding =substitute formula to an existing formula reformats cell value from percentage to plain number
I have a formula which brings sales upsell percentages from a seperate sheet (copied in from an sql database table) into the main page of my sales kpi worksheet.
As you may know, missing data in sql table fields can sometimes appear as "-" or "NaN" and sometimes
"Infinity" given certain circumstances.
Using a formula like: =SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(VLOOKUP(A1,Sheet2!$A$1:$B$2,2,false),"NaN",0),"-",0),"Infinity",0) usually sorts this out, meaning a vlookup would return 0 instead.
The problem comes from adding this type of formula to an exising =IF(ISERROR formula which corrects missing sales agent names where #N/A would usually be returned.
When I try to incorporate an =substitute formula to the existing =IF(ISERROR formula, this
is when the cell values get reformatted as a plain number rather than a percentage.
49.12% would be reformatted as 0.4912)
My formula as it stands:
This returns either the data im after, or zero if nothing is found.
However, if there are results other than the data im after (such as "-" "NaN" "Infinity" etc, mentioned above) this returns a #VALUE error.
Ive tried different ways of adding an =substitute formula, and each time it reformats the cell values from percentage
values to simple numerical values.
This is what ive tried so far:
This returns the correct data, but expressed as 0.4912 rather than 49.12%
Any ideas how this can be avoided?
- Please excuse any syntax errors, formulas typed from memory -
Keys to the Problem adding =substitute formula to an existing formula reformats cell value from percentage to plain number
First off, I would replace your IF(ISERROR(), .., ...) with the IFERROR(...,
This drastically reduces the length of the formula and provides for a default value.
Then use a double unary (e.g.
double minus or --) to attempt a conversion to a true numerical value.
The text values that look like percentages should convert to their numerical values (e.g.
0.4912) and anything else should throw an error, resulting in the default from IFERROR().
=IFERROR(--VLOOKUP(B2, Feed9!$A$2:$AG$127,46,FALSE)), 0)
Format the results as Percentage with two decimal places and you should have real numbers that you can work with.
Note that IFERROR() was introduced with Excel 2007 and if you need to provide compatibility with version of Excel prior to that this proposed solution may not be appropriate.
Running System Update Readiness Command
On running the System Update readiness Command, it will Detect & Replace Incorrect Registry data with the Correct one. Which may ultimately Solve adding =substitute formula to an existing formula reformats cell value from percentage to plain number in Windows.
- Open CMD as Administrator by Simply Right Clicking on Start button > Command Prompt (Admin).
- Now Type or Copy paste "DISM.exe /Online /Cleanup-image /Scanhealth" and hit Enter,
- Now again Type or Copy paste this "DISM.exe /Online /Cleanup-image /Restorehealth" and hit Enter.
- Close the Command Prompt Window because we are done.
Try and see if you still get the same error adding =substitute formula to an existing formula reformats cell value from percentage to plain number in your Windows.
Note: You may be prompted to enter your administrator's password when you try to execute certain system tasks!
Another Safe way to Repair the Problem: adding =substitute formula to an existing formula reformats cell value from percentage to plain number:
How to Fix adding =substitute formula to an existing formula reformats cell value from percentage to plain number with SmartPCFixer?
1. Click the button to download Error Fixer . Install it on your system. Open it, and it will perform a scan for your system. The junk files will be shown in the list.
2. After the scan is finished, you can see the errors and problems need to be fixed. Click Fix All.
3. The Repair part is finished, the speed of your computer will be much higher than before and the errors have been fixed. You can also use other functions in SmartPCFixer. Like dll downloading, windows updating and print spooler error repair.
,Troubleshoot:External Hard Drive not listed in Windows 7 backup wizard Error
,How to Fix Error - Getting an error "not connected to the internet" while trying to install Samsung Kies?
,How to Fix - Internet Explorer shuts down and reopens tab when attaching to email or uploading files.?
,Fast Solution to Problem: Sending Error Message
,[Anwsered] Thinkpad 8611 Boot,How to Resolve - Svchost Helper?,Fast Solution to Problem: L30 101 Driver Windows 7,Troubleshooter of Error: Io Device,How to Fix Error - Dell Laptop Code 39?
Read More: Fast Solution to Error: Adobe flash player states its not installed.,How to Resolve - After I use an Excel 2007 data list sheet for a mail merge, I get an error message when I try to open the list and can never open the spread sheet again?,After closing laptop lid, computer screen won't turn back on when re-opening it and pressing power button. [Anwsered],Troubleshoot:Adobe 9 Pro activation,[Solved] After IE 9 download - I cannot access a favorite web site,a file called mDNSResponse.exe. is causing bonjour not to operate properly,what should I do?,A QUESTION USING THE "IF'S" Formula.,A continuos flashing window with which title is C:Windows\System32\cmd.exe, and has the following message: The syntax of the command is incorrect.,Acrobat compatibility issue and you tube problems____,ActiveX on IE 9 not loaded