Good morning,
I have a calendar in Excel where each month is on a new tab and am trying to populate text based on multiple conditions:
The location of the value that equals 7 days before the date in the referenced cell (EX D18- 7 days = D9)
Then using that location display the value that is offset from that location -7 rows.
**Basic idea = Look specific text in the cell 7 rows above the cell that contains a date 7 days before displayed date.
Part of the problem is that a few days of each month are on that spreadsheet, so if I am trying to reference a cell 7 days before 8/1 I need to look at the previous worksheet.
[TABLE="width: 647"]
<colgroup><col><col><col span="2"><col span="3"><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Sun[/TD]
[TD]Mon[/TD]
[TD]Tue[/TD]
[TD]Wed[/TD]
[TD]Thur[/TD]
[TD]Fri[/TD]
[TD]Sat[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] Load 2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD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11[/TD]
[TD]08/12[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] Load 4[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]21[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]22[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]23[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]24[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]25[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]26[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]27[/TD]
[TD]08/13[/TD]
[TD]08/14[/TD]
[TD]08/15[/TD]
[TD]08/16[/TD]
[TD]08/17[/TD]
[TD]08/18[/TD]
[TD]08/19[/TD]
[/TR]
</tbody>[/TABLE]
This is the current formula I am using but it is specific cells (there are other conditionals) and I would like to not have to adjust every year as the dates move.
=IF(OR(WEEKDAY(D18)=1,WEEKDAY(D18)=7),"",IF(AND(WEEKDAY(D18)=2,ISNUMBER(SEARCH("Load",JUL!I38))),CONCATENATE("Calculate ",(MID(JUL!I38,FIND("Load",JUL!I38)+5,LEN(JUL!I38)))),IF(AND(WEEKDAY(D18)=2,ISNUMBER(SEARCH("Load",C2))),CONCATENATE("Calculate ",(MID(C2,FIND("Load",C2)+5,LEN(C2)))),IF(ISNUMBER(SEARCH("Load",D2)),CONCATENATE("Calculate ",(MID(D2,FIND("Load",D2)+5,LEN(D2)))),""))))
I have a calendar in Excel where each month is on a new tab and am trying to populate text based on multiple conditions:
The location of the value that equals 7 days before the date in the referenced cell (EX D18- 7 days = D9)
Then using that location display the value that is offset from that location -7 rows.
**Basic idea = Look specific text in the cell 7 rows above the cell that contains a date 7 days before displayed date.
Part of the problem is that a few days of each month are on that spreadsheet, so if I am trying to reference a cell 7 days before 8/1 I need to look at the previous worksheet.
[TABLE="width: 647"]
<colgroup><col><col><col span="2"><col span="3"><col></colgroup><tbody>[TR]
[TD] [/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Sun[/TD]
[TD]Mon[/TD]
[TD]Tue[/TD]
[TD]Wed[/TD]
[TD]Thur[/TD]
[TD]Fri[/TD]
[TD]Sat[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] Load 2[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]
[TD] [/TD]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08/16[/TD]
[TD]08/17[/TD]
[TD]08/18[/TD]
[TD]08/19[/TD]
[/TR]
</tbody>[/TABLE]
This is the current formula I am using but it is specific cells (there are other conditionals) and I would like to not have to adjust every year as the dates move.
=IF(OR(WEEKDAY(D18)=1,WEEKDAY(D18)=7),"",IF(AND(WEEKDAY(D18)=2,ISNUMBER(SEARCH("Load",JUL!I38))),CONCATENATE("Calculate ",(MID(JUL!I38,FIND("Load",JUL!I38)+5,LEN(JUL!I38)))),IF(AND(WEEKDAY(D18)=2,ISNUMBER(SEARCH("Load",C2))),CONCATENATE("Calculate ",(MID(C2,FIND("Load",C2)+5,LEN(C2)))),IF(ISNUMBER(SEARCH("Load",D2)),CONCATENATE("Calculate ",(MID(D2,FIND("Load",D2)+5,LEN(D2)))),""))))