If Statement

Eyeris87

Board Regular
Joined
Dec 1, 2015
Messages
104
Enter a formula in cell J4 using the IF function to it whether or not the item Beaded Earrings should go on sale. It will go on sale if its current sales rank (in cell G4) is 8th or lower. (Hint: If the cell value is greater than or equal to 8, it will go on sale.)

So far I have =IF(
G4>="8" I'm stuck on the rest.

Thanks in advance
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
There is probably not enough information here for us to answer. If you were going to type in manually that the item should go on sale, instead of using a formula, what would you do?
 
Upvote 0
Here's the whole question:

Enter a formula in cell J4 using the IF function to it whether or not the item Beaded Earrings should go on sale. It will go on sale if its current sales rank (in cell G4) is 8th or lower. (Hint: If the cell value is greater than or equal to 8, it will go on sale.)
a. If this condition is true, the item will go on sale. (Hint: The if_true value should be “YES”.)
b. If this condition is false, the item doesn’t need to go on sale. (Hint: The if_false value should be “-”.)

I have put an 8 in cell G4

This does not work: =IF(G4>="<8,"yes", "no",, "Go on sale")
 
Last edited:
Upvote 0
Hi
Try
=IF(G4>=8,"sale","no")

Outcome
[TABLE="width: 256"]
<colgroup><col width="64" span="4" style="width:48pt"> </colgroup><tbody>[TR]
[TD="width: 64, align: right"]2[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]no[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]no[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]sale[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]sale[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD]no[/TD]
[/TR]
[TR]
[TD="align: right"]7.9[/TD]
[TD][/TD]
[TD][/TD]
[TD]no[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
The argument:

=IF(G4>=8,"sale","no") is invalid. I do not understand the below. Where do I enter it? As part of the formula? Shouldn't there be dollar signs in the equation? I have "yes" for True and "-" for false

Outcome
[TABLE="class: cms_table, width: 256"]
<tbody>[TR]
[TD="width: 64, align: right"]2[/TD]
[TD="width: 64"][/TD]
[TD="width: 64"][/TD]
[TD="width: 64"]no[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]no[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]sale[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]sale[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD]no[/TD]
[/TR]
[TR]
[TD="align: right"]7.9[/TD]
[TD][/TD]
[TD][/TD]
[TD]no[/TD]
[/TR]
</tbody>[/TABLE]
 
Last edited:
Upvote 0
This sounds like homework, is it?
 
Upvote 0
Enter the formula in J4 to calculate based on the rank in G4. The "sale" outcome for If_true can be changed to "Yes" and the "no" outcome for If_false can be changed to "-"
=IF(G4>=8,"Yes","-")


[TABLE="width: 274"]
<colgroup><col span="2"><col><col></colgroup><tbody>[TR]
[TD]Col. G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[/TR]
[TR]
[TD]Rank[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD="align: right"]6[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD="align: right"]8[/TD]
[TD][/TD]
[TD][/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD="align: right"]9[/TD]
[TD][/TD]
[TD][/TD]
[TD]Yes[/TD]
[/TR]
[TR]
[TD="align: right"]7[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
[TR]
[TD="align: right"]7.9[/TD]
[TD][/TD]
[TD][/TD]
[TD]-[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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