Solved

Excel: Return Error Statement in Text Formula

Posted on 2014-09-09
8
115 Views
Last Modified: 2014-09-14
Hi,

A1 = #Value!
A2 = Test

I would like A3 to display: "#Value! Test"

I enter the formula: "=A1&" "&A2" however it returns just the value error. How can I get the formula to return the text and the error?

Cheers,
0
Comment
Question by:dabug80
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 40313739
Hi,

pls try if you only want the value error to show

=IF(ISERROR(ERROR.TYPE(A1)=3);A1;"#VALUE!")&" "&a2

if not maybe better a User Defined Function like

Function fShowError(rng As Range) As Variant

Set R = rng.Resize(1, 1)
If IsError(R.Value) = True Then
    If R.Value = CVErr(xlErrValue) Then
        Res = "#VALUE!"
    Else
        Res = "Another error"
    End If
Else
    Res = R.Value
End If
fShowError = Res

End Function

Regards
0
 
LVL 19

Expert Comment

by:helpfinder
ID: 40313748
in A3 use
=the same formula as you have in A1&" "&A2
0
 
LVL 51

Expert Comment

by:Rgonzo1971
ID: 40313754
my New Version

=IFERROR(CHOOSE(ERROR.TYPE(A3),"#NULL!","#DIV/0!","#VALUE!","#REF!","#NAME?","#NUM!","#N/A"),A1)&" "&A2
Regards
0
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 
LVL 1

Author Comment

by:dabug80
ID: 40313854
Hi Rgonzo,

Sady that didn't work
0
 
LVL 51

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 40313884
See example
EDIT Corrected Formula

=IFERROR(CHOOSE(ERROR.TYPE(A1),"#NULL!","#DIV/0!","#VALUE!","#REF!","#NAME?","#NUM!","#N/A"),A1)&" "&A2
EE20140910.xlsm
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40314345
As soon as you refer to a cell whose calculated result is an error, the result of the reference to that cell will also be the same error.

Therefore, the following should work:

=IFERROR(A1,"#Value! "&A2)

Extending the question, what do you want in A3 if A1 is not an error?

Thanks,
Rob H
0
 
LVL 33

Expert Comment

by:Rob Henson
ID: 40314371
Ahhh, just re-read the solution from RGonzo and I realise now he has forced the behaviour of the statement in my previous comment, (refer to error = same error) and pulled in the same text value as the error result. Nice one!!

If you want text the same as the error result then that is the way to go. If you want "#Value!" for all errors then mine will suffice.

Thanks
Rob H
0
 
LVL 1

Author Closing Comment

by:dabug80
ID: 40322279
Excellent. Thanks for your help
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question