CoolDann

New Member
Joined
Sep 10, 2011
Messages
1
Hello, I have some formulas in a cells, but some these due to formula, receive this "#¡VALOR!", and I want to replace this "value" with "", I s this possible?, if so, how can I Do it. I made this macro, but can raplace any string, but with "#¡VALOR!" DON'T WORKS. the code is this:

' Replace

Cells.Select
Selection.Replace What:="#¡VALOR!", Replacement:="", LookAt:=x1Part, _
_
SearchOrder:=x1ByRaws, MathCase:=False, SearchFormat:=False,_
ReplaceFormat:=False

Thanks in advance for the help
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Searched the help file and can't find "#¡VALOR!" Is this the English version of Excel and if so, which version???
 
Upvote 0
Hello CoolDann

Maybe trying including in your worksheet formulas IFERROR function like this.


=IFERROR(YOUR_FORMULA,"")

If you receive #¡VALOR! maybe your are using Spanish version of Excel then the formula should be,

=SIERROR(YOUR_FORMULA,"")

or portuguese version

=SE.ERRO(YOUR_FORMULA,"")

Hope this helps.


Regards
 
Last edited:
Upvote 0
You have x1 instead of xl twice. It should be

Rich (BB code):
Cells.Select
Selection.Replace What:="#¡VALOR!", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRaws, MathCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
 
Upvote 0
I would also suggest addressing the problem by adjusting the formula, but if you are using Excel 2003 or earlier you would need a different approach to the one suggested by cgcamal because the IFERROR function only appeared in Excel 2007. You would need (possibly translated)

=IF(ISERROR(your_existing_formula),"",your_existing_formula)
 
Upvote 0
Note also that Find/Replace will not replace the results of a formula.
And if you were trying to Find/Replace in the formulas themselves, or in non-formula cells, you would also need to look at
xlByRows rather than xlByRaws
 
Upvote 0

Forum statistics

Threads
1,214,912
Messages
6,122,204
Members
449,072
Latest member
DW Draft

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