Nested IF statement

Paul long

New Member
Joined
Apr 29, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi Guys,
New to the board.
I'm struggling with a nested IF on a sheet that logs fork lift repairs.
Column K allows me to mark with a "Y" if the job is complete, and if so I want column N to calculate the number of days between the reported date and the repaired date, if it's not been repaired yet, then calculate the number of days between today and the date it was reported.
Picture1.png

In column N I have =IF(K4="Y",(L4-A4),(A2-A4)) As you can see it works if the job is completed, but if there is no "Y" in K, then I want it to calculate days to today since we logged it. As you can see in N5, it doesnt like it.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
would you be kind enough to post your data in a table or use the xl2bb add in (preferable). I cannot read your image in post 1, to try to recreate your scenario.
Unfortunately, I'm on a work PC so cant do addins.

1714386039132.png
 
Upvote 0
Highlight cells A1:N6. right click COPY.
Come to the thread click inside a post, CLICK PASTE.
 
Upvote 0
Ah, fixed it, thanks, I need to fix the cell with the date in:

=IF(K5="Y",(L5-A5),($A$2-A5))

Didnt understand Awoohaw's reply but it led me back to the date cell changin as i dragged it down.
Thanks guys.
 
Upvote 0
Ah, fixed it, thanks, I need to fix the cell with the date in:

=IF(K5="Y",(L5-A5),($A$2-A5))

Didnt understand Awoohaw's reply but it led me back to the date cell changin as i dragged it down.
Thanks guys.
You're welcome, but that is exactly what I said to do in post #6.
 
Upvote 0

Forum statistics

Threads
1,223,958
Messages
6,175,636
Members
452,662
Latest member
Aman1997

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