# Workday and VLook up

✭✭✭

Hello,

This formula works, but it gives me an exact date (my referenced date plus the number of days referenced via the VLOOKUP). I've tried to incorporate the Workdays function without success and wonder if someone else might be able to help me. Here is the formula that works:

=([PCD Draft 1 Start Date]@row + (VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false)))

This adds 6 days to my date of 12-02-2022, which correctly gives me a date of 12-08-2022 . But, I'd like it to add 6 Workdays to my PCD Draft 1 Start date.

• ✭✭✭✭✭✭

@BFuller ok, it looks like since you have 6.5 as the number of days, the workday function doesn't like it. It looks for integers, so you'll need to use the ROUNDUP function...

=WORKDAY([PCD Draft 1 Start Date]@row, ROUNDUP(VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false)))

**I'm assuming you'll always want to round up so you're not coming in short on days. But if you want to round up or down, just change it to ROUND.

Ryan Sides

Come Say Hello!

• ✭✭✭✭✭✭

@BFuller Hi There. If I'm understanding your setup correctly, your Vlookup returns the number of days you want added to the Start Date, but you only want it to add Workdays. If that's right, you can wrap your Vlookup inside of the WORKDAY function.

WORKDAY starts with a date then adds workdays to it.

=WORKDAY([PCD Draft 1 Start Date], VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false))

Is that what you were looking for?

Ryan Sides

Come Say Hello!

• ✭✭✭
edited 12/20/22

@Ryan Sides Yes! That is what I am looking to do. I put that formula in my Workday due date column and get Invalid Data Type error. Here's the formula...am I missing something?

=WORKDAY([PCD Draft 1 Start Date]@row, VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false))

• ✭✭✭✭✭✭

@BFuller That error usually means that the formula is expecting one type (like a date) and getting a different type (like alpha characters or something)

Can you confirm that your PCD Draft 1 Start Date column's type is a Date and the data entered in that row is a date?

Ryan Sides

Come Say Hello!

• ✭✭✭
edited 12/20/22

@Ryan Sides Yes, they are all date columns.

Here is a screenshot in case this helps. Here is the formula I have in that workday due date column:

=WORKDAY([PCD Draft 1 Start Date]@row, VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false))

In the Target due date, I have this formula, which provides the date, but it is not workdays. It's a firm number between the PCD Draft 1 Start date plus the # of days to complete: =([PCD Draft 1 Start Date]@row + (VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false)))

• ✭✭✭✭✭✭

@BFuller Can you send a screenshot of the [Combined Doc type and doc status] column and of the cross sheet reference you created called {Combined and New}?

Ryan Sides

Come Say Hello!

• ✭✭✭✭✭✭

@bfuller are you just wanting to add [# of days to complete] to [PCD Draft 1 Start Date]?

Ryan Sides

Come Say Hello!

• ✭✭✭

@Ryan Sides Yes, but as workdays not actual days. So, this formula works, but I want to incorporate workdays into it:  =([PCD Draft 1 Start Date]@row + (VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false)))

So, in my example above where the due date was 12-8-2022, it would calculate it without counting weekends or holidays.

• ✭✭✭✭✭✭

@BFuller ok, it looks like since you have 6.5 as the number of days, the workday function doesn't like it. It looks for integers, so you'll need to use the ROUNDUP function...

=WORKDAY([PCD Draft 1 Start Date]@row, ROUNDUP(VLOOKUP([Combined Doc type and doc status]@row, {Combined and New}, 2, false)))

**I'm assuming you'll always want to round up so you're not coming in short on days. But if you want to round up or down, just change it to ROUND.

Ryan Sides

Come Say Hello!

• ✭✭✭
edited 12/20/22

Oh my goodness. I love you! THANK YOU SO MUCH!!!!! That worked!!!

• ✭✭✭✭✭✭

You’re welcome! Glad you got it working :)

Ryan Sides