If Then statement

Hoosier03

Board Regular
Joined
Apr 29, 2011
Messages
121
I am using excel 2007. I am trying to write a formula based on data from another worksheet in my file pulled from SAP. If there is not data in the file for the column I want an F to show up. If there is data I want an A to show up.

I have tried this

=IF('Actual Query'!BJ$22:BJ$440="","F","A")

and this

=IF('Actual Query'!BJ$22:BJ$440=0,"F","A")

and a couple of countif functions, but none have worked.


Thanks
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
=IF('Actual Query'!BJ$22:BJ$440="","F","A")

and this

=IF('Actual Query'!BJ$22:BJ$440=0,"F","A")
so the if statements you tried are stating that the entire range would need to be either blank ("") or zero (0). Is that what you mean? Or are you trying to compare a cell on your current worksheet to the SAP pulled data? Post a small sample of data and the expected results
 
Upvote 0
<TABLE style="WIDTH: 154pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=206 border=0><COLGROUP><COL style="WIDTH: 77pt; mso-width-source: userset; mso-width-alt: 3766" span=2 width=103><TBODY><TR style="HEIGHT: 15pt" height=20><TD class=xl531 style="BORDER-RIGHT: #404040 0.5pt solid; BORDER-TOP: #404040 0.5pt solid; BORDER-LEFT: #404040 0.5pt solid; WIDTH: 77pt; BORDER-BOTTOM: #404040 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: #ccccff" width=103 height=20>Actual Quantity</TD><TD class=xl531 style="BORDER-RIGHT: #404040 0.5pt solid; BORDER-TOP: #404040 0.5pt solid; BORDER-LEFT: #404040; WIDTH: 77pt; BORDER-BOTTOM: #404040 0.5pt solid; BACKGROUND-COLOR: #ccccff" width=103>Actual Quantity</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl531 style="BORDER-RIGHT: #404040 0.5pt solid; BORDER-TOP: #404040; BORDER-LEFT: #404040 0.5pt solid; BORDER-BOTTOM: #404040 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: #ccccff" height=20>43</TD><TD class=xl531 style="BORDER-RIGHT: #404040 0.5pt solid; BORDER-TOP: #404040; BORDER-LEFT: #404040; BORDER-BOTTOM: #404040 0.5pt solid; BACKGROUND-COLOR: #ccccff">44</TD></TR><TR style="HEIGHT: 15pt" height=20><TD class=xl531 style="BORDER-RIGHT: #404040 0.5pt solid; BORDER-TOP: #404040; BORDER-LEFT: #404040 0.5pt solid; BORDER-BOTTOM: #404040 0.5pt solid; HEIGHT: 15pt; BACKGROUND-COLOR: #ccccff" height=20>Period 43</TD><TD class=xl531 style="BORDER-RIGHT: #404040 0.5pt solid; BORDER-TOP: #404040; BORDER-LEFT: #404040; BORDER-BOTTOM: #404040 0.5pt solid; BACKGROUND-COLOR: #ccccff">Period 44</TD></TR></TBODY></TABLE>

<TABLE style="WIDTH: 154pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=206 border=0><COLGROUP><COL style="WIDTH: 77pt; mso-width-source: userset; mso-width-alt: 3766" span=2 width=103><TBODY><TR style="HEIGHT: 15.75pt" height=21><TD class=xl531 style="BORDER-RIGHT: #4d6776 0.5pt solid; BORDER-TOP: #4d6776 0.5pt solid; BORDER-LEFT: #4d6776 0.5pt solid; WIDTH: 77pt; BORDER-BOTTOM: #4d6776 0.5pt solid; HEIGHT: 15.75pt; BACKGROUND-COLOR: #eef9ff" width=103 height=21></TD><TD class=xl531 style="BORDER-RIGHT: #4d6776 0.5pt solid; BORDER-TOP: #4d6776 0.5pt solid; BORDER-LEFT: #4d6776; WIDTH: 77pt; BORDER-BOTTOM: #4d6776 0.5pt solid; BACKGROUND-COLOR: #eef9ff" width=103></TD></TR><TR style="HEIGHT: 15.75pt" height=21><TD class=xl532 style="BORDER-RIGHT: #4d6776 0.5pt solid; BORDER-TOP: #4d6776; BORDER-LEFT: #4d6776 0.5pt solid; BORDER-BOTTOM: #4d6776 0.5pt solid; HEIGHT: 15.75pt; BACKGROUND-COLOR: #eef9ff" height=21>5.00 EA</TD><TD class=xl531 style="BORDER-RIGHT: #4d6776 0.5pt solid; BORDER-TOP: #4d6776; BORDER-LEFT: #4d6776; BORDER-BOTTOM: #4d6776 0.5pt solid; BACKGROUND-COLOR: #eef9ff"></TD></TR></TBODY></TABLE>

Week 43 has data and week 44 does not. This is because week 44 has not happened in the fiscal year. If the rows have data I want an "A" to show up so the actual data will be used. If the rows do not have data I want an "F" to show up so the forecast data will be used.

I am not trying to compare cells. I just want an "A" if there is data in the column on the worksheet and an "F" if there is not.

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,908
Members
452,949
Latest member
beartooth91

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