Len if and

horizonflame

Board Regular
Joined
Sep 27, 2018
Messages
156
Hi

I have set-up the below but the LEN calculation seems wrong as LEN that isn't 15 is matching and doing the workday function.

=IF(AND(LEN($B10=15),$C10="Apple"),WORKDAY($I10,45,Info!$B$18:$B$25),
IF(AND(LEN($B10=15),$C10="Banana"),WORKDAY($I10,45,Info!$B$18:$B$25),$I10))
Can anyone see what is wrong please?
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,764
Office Version
365
Platform
Windows
You've got the clsoing bracket in the wrong place, it should be
LEN($B10)=15,$C10
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,764
Office Version
365
Platform
Windows
Can you post some sample data?
 

horizonflame

Board Regular
Joined
Sep 27, 2018
Messages
156
COLUMN B

COLUMN D
COLUMN I
FORMULA COLUMN
777/11215
Pear
30/03/2020
30/03/2020
777/11531
Apple

30/09/2019
30/09/2019
777/00164
Melon
31/07/2019
31/07/2019
777/11392
Banana
29/08/2019
29/08/2019
777/11875
Banana
30/09/2019
30/09/2019
777/11389
Apple
31/07/2019
31/07/2019
777/11390
Pear
29/11/2019
29/11/2019
777/11680/04/01
Apple
31/03/2020
#VALUE

<tbody>
</tbody>
 
Last edited:

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,764
Office Version
365
Platform
Windows
One thing that springs to mind is the formula is looking at col C, but your sample shows it should be col D.
Also the word Apple on row 10 has a space after it.
Another thing to check is make sure the dates on the info sheet are real dates, rather than text.
 

horizonflame

Board Regular
Joined
Sep 27, 2018
Messages
156
One thing that springs to mind is the formula is looking at col C, but your sample shows it should be col D.
Also the word Apple on row 10 has a space after it.
Another thing to check is make sure the dates on the info sheet are real dates, rather than text.
Thanks Fluff - the issue was the dates ref. Cheers!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,764
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Watch MrExcel Video

Forum statistics

Threads
1,089,761
Messages
5,410,273
Members
403,305
Latest member
tray2014

This Week's Hot Topics

Top