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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
35,622
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,622
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,622
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,622
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Forum statistics

Threads
1,089,475
Messages
5,408,462
Members
403,208
Latest member
JFoley182

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top