Formula based on response of another formula

MilenaKanwal

New Member
Joined
Mar 18, 2014
Messages
12
I have a spreadsheet that pulls date from another file to populate all but 1 column. In that column I need to have a formula that returns one of three responses:

If E2 is blank, then keep F2 blank
If E2 has a 1, then F2 should say 'single'
If E2 has a value greater than 1, then F2 should say 'multiple'

E2's formula begins with an IFERROR function, so if there is no data in the corresponding cell of the source data, it leaves the cell as a blank. ("")

I tried 2 different nested IF functions (see below), but somehow I can't seem to think of how make it all come together.

=IF(E2=1,"Single",IF(E2="","","Multiple"))
=IF(E2="","",IF(E2=1,"Single",IF(E2>1,"Multiple","")))
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Either of those formulas should do what you're describing.

Can you post the formula that you have in E2 ?
Perhaps it's not returning a real number, but a number stored as text.

Also please describe in more detail what happens when you tried those formulas..
Did it give an error? What error?
Did you get the wrong result, what result DID you get, what result did you expect, and why?
 
Upvote 0
The formula in E2 is:

=ABS(IFERROR(INDIRECT("'SHEET1'!"&ADDRESS(MATCH($A138,sheet1!$A$1:$A$3000,0),MATCH(I$1, sheet1!$2:$2,0))),""))

Results are as follows:

=IF(E2=1,"Single",IF(E2="","","Multiple"))

Returns a blank if blank, 'Multiple' if greater than 1 and 'Multiple' if '1'

------------------------------------------------------------------------------

=IF(E2="","",IF(E2=1,"Single",IF(E2>1,"Multiple","")))

Returns a blank if blank, 'Multiple' if greater than 1 and blank if '1'

Expected returns:

If E2 is blank, then keep F2 blank
If E2 has a 1, then F2 should say 'single'
If E2 has a value greater than 1, then F2 should say 'multiple'



Either of those formulas should do what you're describing.

Can you post the formula that you have in E2 ?
Perhaps it's not returning a real number, but a number stored as text.

Also please describe in more detail what happens when you tried those formulas..
Did it give an error? What error?
Did you get the wrong result, what result DID you get, what result did you expect, and why?
 
Upvote 0
I figured out my problem!

I should have had the formula in E2 begin with ROUND to account for source data that was less than 1 but more than 0 (ie .78)

Once I did that, it worked perfectly!
 
Upvote 0
Again, either of those 2 formulas will do what you're asking.

It sounds like E2 is NOT exactly 1.
Perhaps it's actually 1.05 or something, with the cell formatted to 0 decimals.
So it appears rounded to 1, but it's not really exactly 1.

Format E2 to show 15 decimals, what do you see?
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,915
Members
452,366
Latest member
TePunaBloke

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