ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   If statement help (https://www.excelbanter.com/excel-worksheet-functions/57997-if-statement-help.html)

STEVEB

If statement help
 

Hi,

Does anyone have any sugesstions for the following:

I have the following formula that looks at the first three digits in
cell B18 and enters a various code based on certain situations.

=IF(ISNA($B$7),"",IF(AND(LEFT($B$7,3)="122",$B18= 1000000),"G3",IF(AND(LEFT($B$7,3)="629",$B18=1000 000,COUNT(J18:O18)=0),"G1",IF(AND(LEFT($B$7,3)="62 9",$B18=1000000,COUNT(J18:O18)<0),"G1/G2",IF(AND(LEFT($B$7,3)="629",$B18=100000,COUNT(J 18:O18)<0),"G2","")))))

I would like the formula to include "630" & "631" wherever "629" is
referenced in the formula.

Any help would be greatly appreciated.


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489477


bpeltzer

If statement help
 
Replace LEFT($B$7,3)="629"
with OR(left($b$7,3)="629",left($b$7,3)="630",left($b$7 ,3)="631")
HTH. --Bruce

"STEVEB" wrote:


Hi,

Does anyone have any sugesstions for the following:

I have the following formula that looks at the first three digits in
cell B18 and enters a various code based on certain situations.

=IF(ISNA($B$7),"",IF(AND(LEFT($B$7,3)="122",$B18= 1000000),"G3",IF(AND(LEFT($B$7,3)="629",$B18=1000 000,COUNT(J18:O18)=0),"G1",IF(AND(LEFT($B$7,3)="62 9",$B18=1000000,COUNT(J18:O18)<0),"G1/G2",IF(AND(LEFT($B$7,3)="629",$B18=100000,COUNT(J 18:O18)<0),"G2","")))))

I would like the formula to include "630" & "631" wherever "629" is
referenced in the formula.

Any help would be greatly appreciated.


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489477



STEVEB

If statement help
 

Thanks for your help! The formula worked great!


--
STEVEB
------------------------------------------------------------------------
STEVEB's Profile: http://www.excelforum.com/member.php...fo&userid=1872
View this thread: http://www.excelforum.com/showthread...hreadid=489477



All times are GMT +1. The time now is 03:46 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com