More efficient way to lookup and concatenate multiple cells from multiple sheets

torsades

New Member
Joined
Jun 11, 2016
Messages
1
I am planning a roster across a 12 month calendar, with "days" split into clusters of cells and months in different sheets.

I need to check each "day" if "leave" is indicated.

If it is, I need to collate the values of the cells in that "day", and output it in a specified format.

I need to do this for every day in each "month" and finally collate all the values from all the "months" (sheets) into a final output cell for the year.

What I've done is create a formula to check for this for each day, copied across the cells it for all the days, then concatenate it for each week and month, copy the same formulas into each month, and finally concatenate it for the year.

Is there a more efficient way to accomplish the same result?

Below is a sample of a week's roster (there are 4-5 weeks in each month, the format is similar).

Thanks for any opinions or suggestions.

1

*ABCDEFGHIJKLMNOPQRSTUVWXYZAAABAC
2725Leave26*27*28*29Leave30*31**25 Jan Wednesday AM: AM roster
25 Jan Wednesday PM: PM roster
*******29 Jan Sunday AM: AM roster
29 Jan Sunday PM: PM roster
****25 Jan Wednesday AM: AM roster
25 Jan Wednesday PM: PM roster
29 Jan Sunday AM: AM roster
29 Jan Sunday PM: PM roster
28**********************
29AM rosterAM rosterAM rosterAM rosterAM roster*****************
30PM rosterPM rosterPM rosterPM rosterPM roster*****************

<tbody>
</tbody>

Spreadsheet Formulas
CellFormula
P27=IF(ISNUMBER(SEARCH("leave",B27)),CONCATENATE(TEXT(A27,"d mmm [$-4809]dddd "),"AM: ",A29,CHAR(10),TEXT(A27,"d mmm [$-4809]dddd "),"PM: ",A30,CHAR(10)),"")
R27=IF(ISNUMBER(SEARCH("leave",D27)),CONCATENATE(TEXT(C27,"d mmm [$-4809]dddd "),"AM: ",C29,CHAR(10),TEXT(C27,"d mmm [$-4809]dddd "),"PM: ",C30,CHAR(10)),"")
T27=IF(ISNUMBER(SEARCH("leave",F27)),CONCATENATE(TEXT(E27,"d mmm [$-4809]dddd "),"AM: ",E29,CHAR(10),TEXT(E27,"d mmm [$-4809]dddd "),"PM: ",E30,CHAR(10)),"")
V27=IF(ISNUMBER(SEARCH("leave",H27)),CONCATENATE(TEXT(G27,"d mmm [$-4809]dddd "),"AM: ",G29,CHAR(10),TEXT(G27,"d mmm [$-4809]dddd "),"PM: ",G30,CHAR(10)),"")
X27=IF(ISNUMBER(SEARCH("leave",J27)),CONCATENATE(TEXT(I27,"d mmm [$-4809]dddd "),"AM: ",I29,CHAR(10),TEXT(I27,"d mmm [$-4809]dddd "),"PM: ",I30,CHAR(10)),"")
Z27=IF(ISNUMBER(SEARCH("leave",L27)),CONCATENATE(TEXT(K27,"d mmm [$-4809]dddd "),"AM: ",K29,CHAR(10),TEXT(K27,"d mmm [$-4809]dddd "),"PM: ",K30,CHAR(10)),"")
AB27=IF(ISNUMBER(SEARCH("leave",N27)),CONCATENATE(TEXT(M27,"d mmm [$-4809]dddd "),"AM: ",M29,CHAR(10),TEXT(M27,"d mmm [$-4809]dddd "),"PM: ",M30,CHAR(10)),"")
AC27=CONCATENATE(P27,R27,T27,V27,X27)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,215,338
Messages
6,124,360
Members
449,155
Latest member
ravioli44

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