Convert value in cell to show text

nparsons75

Well-known Member
Joined
Sep 23, 2013
Messages
1,256
Office Version
  1. 2016
Hi, I need to show some text in a cell based on the value in another cell. This is the formula I am using which is working great.

=IF(F17=100,"Complete",IF(F17>0,"Active",IF(F17=0,"Pending","")))

However, I need to add a fourth criteria, F17=999,"On Hold"

When I try this it errors saying to many arguments for this function. Does anyone know a better way or a workaround.

Thank you.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
I am not sure of your complete range of values, but perhaps something like this...

=IF(F17="","",LOOKUP(F17,{0,1,100,999},{"Pending","Active","Complete","On Hold"}))
 
Upvote 0
Hi Rick,

That looks risky and doesn't generate the same results as the original formula:


Excel 2016 (Windows) 32 bit
FGH
17-1#N/A 
180PendingPending
191ActiveActive
202ActiveActive
21100CompleteComplete
22101CompleteActive
23999On HoldOn Hold
241000On HoldActive
Sheet1
Cell Formulas
RangeFormula
G17=IF(F17="","",LOOKUP(F17,{0,1,100,999},{"Pending","Active","Complete","On Hold"}))
H17=IF(F17=999,"On Hold",IF(F17=100,"Complete",IF(F17>0,"Active",IF(F17=0,"Pending",""))))


WBD
 
Last edited:
Upvote 0
Hi, It seems to work for me, thanks Rick. I will also look at your solution WBD as maybe I will come up against an error later after further tests. So far though it looks good. Thank you
 
Upvote 0
Hi Rick,

That looks risky and doesn't generate the same results as the original formula:
Whether my formula works for the OP or not depends on what values can be used when the value is not 0, 100 or 999 (which is why I started my post by saying "I am not sure of your complete range of values"). Based on what the OP posted in Message #6 , it seems whatever restricted set of values are actually being used fall within the ranges I set up within my formula.
 
Upvote 0
Hey Rick Rothstein,

I wasn't trying to criticize your post and I apologize if that's how you saw it. I wanted to make the OP aware that it could potentially produce different results if the data wasn't as well-defined as it appeared to be. I've fallen into the trap of doing similar approaches before only for the OP to suddenly throw new data into the mix which invalidates my entire solution.

Greetings from the UK :wink:

WBD
 
Last edited:
Upvote 0
Hey Rick Rothstein,

I wasn't trying to criticize your post and I apologize if that's how you saw it. I wanted to make the OP aware that it could potentially produce different results if the data wasn't as well-defined as it appeared to be. I've fallen into the trap of doing similar approaches before only for the OP to suddenly throw new data into the mix which invalidates my entire solution.
I did not take it to be criticism. And I thought about the other values problem you raised when I developed my formula. It just didn't seem plausible to me to assume an Active designation (if I am remembering this correctly) would exist on the other side of markers for Complete or Pending or whatever; so I assumed they wouldn't and added my qualifying text "just in case". And yes, I know exactly what you mean about OPs throwing in "monkey wrenches" by telling us about conditions they did not mention initially.
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,307
Members
452,633
Latest member
DougMo

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