logical formula without using =IF

Hammerjoe

Board Regular
Joined
Feb 4, 2012
Messages
76
I am trying to create a formula in excel 2007 without using =IF and I am struggling to come up with a solution.

Cell A1 is the input cell and cell b1 is another input cell.

I am creating a table from A5 to a50 starting with A5=1

The formula I am looking for in row B1:B50 is equal to cell A if cell A<=$A$1 and if($b$1=2) otherwise it equals zero.

I got the formula below but I would like to simplify it without using the IF condition:

IF(A5<=$A$1,A5,IF($b$1=2,0,A5))


Thank you
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
You did state
"The formula I am looking for in row B1:B50 is equal to cell A if cell A<=$A$1 and if($b$1=2) otherwise it equals zero."
 
Upvote 0
I got the formula below but I would like to simplify it without using the IF condition:

IF(A5<=$A$1,A5,IF($b$1=2,0,A5))

I do not know why you do not want to use the IF function.
Although it's more complicated, in my opinion, see if this does what you want

=A5*((A5<=A$1)+(A5>A$1)*(B$1<>2))

M.
 
Upvote 0
The formula I am looking for in row B1:B50 is equal to cell A if cell A<=$A$1 and if($b$1=2) otherwise it equals zero.

I got the formula below but I would like to simplify it without using the IF condition:

IF(A5<=$A$1,A5,IF($b$1=2,0,A5))
That formula does not do what your said you want in the first sentence above. You formula says to return A if either A<$A$1 or $B$1<>2. So which do you want... what you said in the first sentence or what your formula returns?
 
Upvote 0
I do not know why you do not want to use the IF function.
Although it's more complicated, in my opinion, see if this does what you want

=A5*((A5<=A$1)+(A5>A$1)*(B$1<>2))
I am not 100% sure the OP's formula is what he actually wants (see Message #7 ). However, if it is, and if I am not mistaken, I think the following does the same thing as it does...

=A5*((A5<$A$1)+($B$1<>2))

By the way, I agree with you.. I cannot see any good reason to not use the IF function (I believe the to IFs are more efficient than the addition and multiplications inherent in our two offerings).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,635
Messages
6,173,479
Members
452,516
Latest member
archcalx

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