mkrecknagel
New Member
- Joined
- Apr 3, 2019
- Messages
- 2
Hello All!
Long time reader of this site, but currently I cannot find a solution to my problem.
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD]Redmond[/TD]
[TD]Beijing[/TD]
[TD]Dublin[/TD]
[TD]Hyderabad[/TD]
[TD]Munich[/TD]
[TD]Singapore[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]Jul[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]Aug[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD]Sep[/TD]
[TD]8[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]Oct[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]Nov[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Desired Results - Located on Sheet 2
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Jul[/TD]
[TD]Redmond[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]3[/TD]
[TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]4[/TD]
[TD]Jul[/TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]5[/TD]
[TD]Jul[/TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]6[/TD]
[TD]Jul[/TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]7[/TD]
[TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]8[/TD]
[TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]9[/TD]
[TD]
[TD]<strike></strike>
[/TR]
[TR]
[TD]10[/TD]
[TD]
[TD]Beijing[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]
[TD]Dublin[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]
[TD]Dublin[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]
[TD]Hyderabad[/TD]
[/TR]
</tbody>[/TABLE]
Logic Check:
Long time reader of this site, but currently I cannot find a solution to my problem.
For a little background info this table is a planned amount of events at each location per month. And the formula is reading this table and transferring the information into a new list on another worksheet, thus this table cannot be sorted and the output list (formula) should return the outputs from left to right. An Array formula would be acceptable, but I do not want to use VBA as I am not well versed in them and I like the instant and live results of formulas. Also because this workbook will be sent out to Excel users who have very little knowledge and must be automatic, efficient and work seamlessly in the background with no other involvement than predefined inputs.
Named Range (A15:G20) = Events, Located on Sheet1
[TABLE="class: grid, width: 500"]Named Range (A15:G20) = Events, Located on Sheet1
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
[TR]
[TD]15[/TD]
[TD][/TD]
[TD]Redmond[/TD]
[TD]Beijing[/TD]
[TD]Dublin[/TD]
[TD]Hyderabad[/TD]
[TD]Munich[/TD]
[TD]Singapore[/TD]
[/TR]
[TR]
[TD]16[/TD]
[TD]Jul[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]17[/TD]
[TD]Aug[/TD]
[TD]3[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]18[/TD]
[TD]Sep[/TD]
[TD]8[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]19[/TD]
[TD]Oct[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]20[/TD]
[TD]Nov[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Desired Results - Located on Sheet 2
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Jul[/TD]
[TD]Redmond[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]
Jul
<strike></strike>[/TD][TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]3[/TD]
[TD]
Jul
<strike></strike>[/TD][TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]4[/TD]
[TD]Jul[/TD]
[TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]5[/TD]
[TD]Jul[/TD]
[TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]6[/TD]
[TD]Jul[/TD]
[TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]7[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]8[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]9[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]<strike></strike>
Redmond
<strike></strike>[/TD][/TR]
[TR]
[TD]10[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]Beijing[/TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]Dublin[/TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]Dublin[/TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]
Aug
<strike></strike>[/TD][TD]Hyderabad[/TD]
[/TR]
</tbody>[/TABLE]
Here is my formula: =Index(Events, MATCH($C1,'Sheet1'!$A$16:$A$20,0), Match(COUNTIF($C$1:$C1,$C1),Sum(A15:G15),1))
Scenario: Column C is prepopulated by another formula. This new formula would be pasted in D1 and copied down, and return the Event locations (column headers) based on the count of how many times that month has appeared in Column C. If the count of months in Column C exceeds the planned number of events in the first column, then it will sum the next column until the sum is greater than or equal to the count of month.
Logic Check:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Jul (Row=1,Count=1)[/TD]
[TD](Count <= Sum(col1) = col1)
(1 <= 6) =
[/TR]
[TR]
[TD]2[/TD]
[TD]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Jul
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]Jul
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]Jul
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]9[/TD]
[TD]
[TD]<strike></strike>[/TD]
[/TR]
[TR]
[TD]10[/TD]
[TD]
[TD]
[/TR]
[TR]
[TD]11[/TD]
[TD]
[TD]
[/TR]
[TR]
[TD]12[/TD]
[TD]
[TD]
[/TR]
[TR]
[TD]13[/TD]
[TD]
[TD]
[/TR]
</tbody>[/TABLE]
And so on down the list...
<tbody>[TR]
[TD][/TD]
[TD]C[/TD]
[TD]D[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]Jul (Row=1,Count=1)[/TD]
[TD](Count <= Sum(col1) = col1)
(1 <= 6) =
Redmond
[/TD][/TR]
[TR]
[TD]2[/TD]
[TD]
Jul
[/TD](
Row=1,
Count=2)[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(2 <= 6) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]3[/TD]
[TD]
Jul
[/TD](
Row=1,
Count=3)[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(3 <= 6) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]4[/TD]
[TD]Jul
(
[/TD]Row=1,
Count=4)[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(4 <= 6) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]5[/TD]
[TD]Jul
(
[/TD]Row=1,
Count=5)[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(5 <= 6) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]6[/TD]
[TD]Jul
(
[/TD]Row=1,
Count=6)[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(6 <= 6) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]7[/TD]
[TD]
Aug
[/TD](Row=2,Count=1)
[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(1 <= 3) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]8[/TD]
[TD]
Aug
[/TD](Row=2,Count=2)
[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(2 <= 3) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]9[/TD]
[TD]
Aug
[/TD](Row=2,Count=3)
[TD]<strike></strike>
(Count <= Sum(col1) = col1)
(3 <= 3) = Redmond
<strike></strike>
[/TR]
[TR]
[TD]10[/TD]
[TD]
Aug
[/TD](Row=2,Count=4)
[TD]
(Count > Sum(col1) Therefore (Count <= Sum(col1+col2))
[/TD](4 > 3) Therefore (4 <= 3+1) = Beijing
[/TR]
[TR]
[TD]11[/TD]
[TD]
Aug
[/TD](Row=2,Count=5)
[TD]
(Count > Sum(col1+col2)) Therefore
<strike></strike>(Count <= Sum(col1+col2+col3))
(5 > 3+1) Therefore (5 <= 3+1+2) =
Dublin[/TD][/TR]
[TR]
[TD]12[/TD]
[TD]
Aug
[/TD](Row=2,Count=6)
[TD]
(Count <= Sum(col1+col2+col3))
(6 <= 3+1+2) =
Dublin[/TD](6 <= 3+1+2) =
[/TR]
[TR]
[TD]13[/TD]
[TD]
Aug
[/TD](Row=2,Count=7)
[TD]
(Count > Sum(col1+col2+col3)) Therefore (Count <= Sum(col1+col2+col3+col4))
(7 <= 3+1+2+2) =
Hyderabad[/TD](7 <= 3+1+2+2) =
[/TR]
</tbody>[/TABLE]
And so on down the list...