Len if and

horizonflame

Board Regular
Joined
Sep 27, 2018
Messages
145
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?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
32,315
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
32,315
Office Version
365
Platform
Windows
Can you post some sample data?
 

horizonflame

Board Regular
Joined
Sep 27, 2018
Messages
145
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
32,315
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
145
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
32,315
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Forum statistics

Threads
1,082,243
Messages
5,363,972
Members
400,772
Latest member
solbebe

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top