Recording the difference between two date cells associated with a value on another cell
Hello All,
I have two locations where vehicles are going and spending time being worked on. I want to record the days each vehicle spends at each location. I cant seem to be able to count the difference between dates based on location. Thanks
Answers
-
@Marcelo Maceira , I'm not sure I understand your use case, based on the image. Are you trying to acquire the number of days in a separate column (not displayed) for each row?
In that case, add a column with either of the following column formulas to count calendar days or business days respectively, where the dates would reference the date cells contained in your sheet:
=NETDAYS([Chassis Arrival Date]@row, [PDI End Timestamp]@row)
=NETWORKDAY([Chassis Arrival Date]@row, [PDI End Timestamp]@row)
If this isn't the use case you're trying to achieve, please clarify.
-
Thank you for your message Jen. Sorry for not being more descriptive of what I'm trying to do here.
I've got as far as counting the days for each row. Now I'm stuck at separating the count for YUMA and for CVS. How do I bring in the PDI Location column into the equation so it recognizes which ones are YUMA and which are CVS?
-
@Jen Lange Here is a look at what I'm trying to do:
The formula for Days at Location is =NETWORKDAYS([Truck In]1, [Truck Out]1)
I am now trying to only count for each location. I tried =NETWORKDAYS([Truck In]1, [Truck Out]1), Location@row, = "YUMA" but it doesn't work. Any help would be appreciated.
Thanks
-
@Marcelo Maceira , did you use an IF statement in each corresponding column?
=IF(Location @row = "YUMA",NETWORKDAYS([Truck In]1, [Truck Out]1),"")
=IF(Location @row = "CVS",NETWORKDAYS([Truck In]1, [Truck Out]1),"")
=IF(Location @row = "BODY",NETWORKDAYS([Truck In]1, [Truck Out]1),"")
Let me know if this works for you.
-Jen
-
@Jen Lange That was it! I'm kicking myself for not getting it on my own. Thanks for your help Jen!
-
Oh good. I'm glad I was able to help, @Marcelo Maceira.
Thank you for your engagement and contribution to our community. Your inquiry is likely to assist other members across time.
If you appreciate my response, please recognize the effort by accepting my answer, as well as with an "Insightful" or "Vote Up" selection. Thanks!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!