ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding 2 days to a day (https://www.excelbanter.com/excel-discussion-misc-queries/163943-adding-2-days-day.html)

[email protected]

Adding 2 days to a day
 
Here is the scenerio:

A1 contains the workschedule
B1 contains a specific day
C1 I want to add 2 days on to B1, but the days fust be contained in A1

Example

A1: MTRS9a-10p (m=monday t=tuesday, r=thursday, s=saturday)
B1: R
C1: I would want 2 working day from this day. So, I would want it to
show M

Example 2:
A1: MTRS9a-10p
B1: M
C1: I want to display R

Any Ideas? I am totally stumped. I thought of doing match/index/
vlookups.
Any help would be GREATLY appreciated =)


JE McGimpsey

Adding 2 days to a day
 
I'm assuming that workdays will *not* always be MTRS, right?

If so, here's one way that provides a general solution for 1 to 7
workdays per week:

=MID(REPT(LEFT(A1, MATCH(TRUE, ISNUMBER(-MID(A1, {1;2;3;4;5;6;7;8},
1)), FALSE) - 1), 3), FIND(B1,A1) + 2, 1)

If the workdays will always be MTRS, this simplifies to

=MID("MTRSMT",FIND(B1,"MTRS")+2,1)


In article .com,
wrote:

Here is the scenerio:

A1 contains the workschedule
B1 contains a specific day
C1 I want to add 2 days on to B1, but the days fust be contained in A1

Example

A1: MTRS9a-10p (m=monday t=tuesday, r=thursday, s=saturday)
B1: R
C1: I would want 2 working day from this day. So, I would want it to
show M

Example 2:
A1: MTRS9a-10p
B1: M
C1: I want to display R

Any Ideas? I am totally stumped. I thought of doing match/index/
vlookups.
Any help would be GREATLY appreciated =)


[email protected]

Adding 2 days to a day
 
Correct. This was just the example i used. The work days vary.
Thanks


[email protected]

Adding 2 days to a day
 
Works GREAT! Thank you sooo much =)





All times are GMT +1. The time now is 03:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com