A little direction...

brandonrlz

New Member
Joined
Jul 29, 2011
Messages
30
First...best find!! The site and video's are pure awesome and help provide me with a lot of refresher courses as well as new tactics so thanks to everyone!!

Here's my dilemma...I did some searching but couldn't really find anything that really targets what I'm trying to do, so any direction on how to approach this would be fantastic!!

I've got three columns in a spreadsheet that I want to slim down to one level and use some conditional formatting to build a dashboard out of it. That part won't be to difficult to do; however, I'm having a little bit of a brain fart in how to accomplish this.

Column 1 - Column 2 - Column 3
Bob - 1 - 1
Bob - 2 - 2
Bob - 3 - 3
Bill - 4 - 4
Bill - 5 - 5
Bill - 6 - 6
Steve - 7 - 7
Steve - 8 - 8
Steve - 9 - 9

What I want to do is take each line item and combine/calculate it into one line item.

Bob - 12
Bill - 30
Steve - 48

I've tried using "sumif" to do this; however, it's only capturing the first column of data.

Code:
=SUMIF(A1:A9,"Bob",B1:C9)

I'm wondering if doing an array would work better in this situation, or if I should be taking a different approach entirely.

Thanks for the help and insight on this.
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
or more dynamic (that is if you assign a name to the range)

This way you do not need to retype your list and risk of having duplication. Just a suggestion.


Excel Workbook
CDEFGH
6****Unique L.Totals
7Bob11*Bill30
8Bob22*Bob12
9Bob33*Steve48
10Bill44***
11Bill55***
12Bill66***
13Steve77***
14Steve88***
15Steve99***
Sheet1
 
Upvote 0
Just noticed the "0" was missing in the mactch formula for match type. Though it works but better have it in the correct way. :)

{=INDEX($C$7:$C$15,MATCH(0,COUNTIF($C$7:$C$15,"<"&$C$7:$C$15)-SUM(COUNTIF($C$7:$C$15,$G$6:G6)),))}

should be :
{=INDEX($C$7:$C$15,MATCH(0,COUNTIF($C$7:$C$15,"<"&$C$7:$C$15)-SUM(COUNTIF($C$7:$C$15,$G$6:G6)),0))}
 
Upvote 0
Thanks a ton for the info, I really appreciate it! A follow-up question though is, are you not able to pass number values with some of the formula's? Here's what I have:

Excel Workbook
ABC
1CustomerValue 1Value 2
2Bob4,548,7783,539,052
3Bob4,548,7783,539,052
4Bob4,548,8203,539,052
5Bob315,332257,639
6888694,9367,051
788874,6316,811
8888803,193284,351
9Bill2,510,4040
10Bill4100
11Bill2030
12Bill4,664,96329,394
13
14Cell RangeName
15A2:A12customer
16B2:C12custCMB
Sheet1


Excel Workbook
F
2Formula
3{=INDEX(customer,MATCH(0,COUNTIF(customer,"
4=SUMPRODUCT((customer=$A6)*(custCMB))
Sheet1


Excel Workbook
AB
18CustomerCombined Value
19Bob24836503
20Bill43503567
Sheet1


The formula completely skips over the "888" values as if they aren't even there. Also, with these types of calculations am I going to run into any sort of "calculation process"? I ask because the data extract will be broken up into months with each month having roughly 2k line items.
 
Upvote 0
I think this one can handle whatever is throw at it.


Excel Workbook
CDEFGH
5****Count of uniques*
6****5*
7CustomersValue 1Value 2*CustomersTotal
8Bob4,548,7783,539,052*Bob24,836,503.00
9Bob4,548,7783,539,052*888* 1,870,973.00
10Bob4,548,8203,539,052*Bill* 2,510,814.00
11Bob315,332257,639*Anything* * * * * *203.00
12888694,9367,051*45toy* 4,694,357.00
1388874,6316,811***
14888803,193284,351***
15Bill2,510,4040***
16Bill4100***
17Anything2030***
1845toy4,664,96329,394***
Sheet1



this has high overhead my trick is after the extract I copy and paste special the entire sheet with exception of top row (so I can reproduce it ) and then send it out to others for review or whatever purpose they need it for.
 
Last edited:
Upvote 0
Hey thanks for the formula it helped a ton!! I'm running into a problem though when I try to use name ranges for the formulas...the values return a no data, but I can't seem to figure out what I'm missing in the syntax.

Excel Workbook
CDE
7CustomersValue 1Value 2
8Bob45487783539052
9Bob45487783539052
10Bob45488203539052
11Bob315332257639
128886949367051
13888746316811
14888803193284351
15Bill25104040
16Bill4100
17Anything2030
1845toy466496329394
19
20custJan2011
21custCMBJan2011
22
23A1{=SUMPRODUCT((custJan2011"")/COUNTIF(custJan2011,custJan2011&""))}
24=IF(A6="","",SUMPRODUCT((custJan2011=A6)*(custCMBJan2011)))
25{=IF(ROWS(custJan2011)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW($A$6)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A6))))}
Sheet3



 
Upvote 0
{=IF(ROWS(custJan2011)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW($A$6)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A6))))}

ROWS(custJan2011) <--- You can not use range for this part of the formula, it chaeck to see if the counts of row are less more than the count of unique names. in another words it control when to stop calculation ( processing the formula)

Hence the working formula will be:
=IF(ROWS($E2:E2)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW($A$6)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($E$2:E2))))

Provided your unique list STARTS on A6 on my table as below it starts E2


Excel Workbook
ABCDEFGH
15CustomersValue 1Value 2Value 1 & 2
2*CustomersValue 1Value 2Bob13,961,708.0010,874,795.0024836503
3*Bob45487783539052888* 1,572,760.00* * 298,213.001870973
4*Bob45487783539052Bill* 2,510,814.00* * * * * * * * - *2510814
5*Bob45488203539052Anything* * * * * 203.00* * * * * * * * - *203
6*Bob31533225763945toy* 4,664,963.00* * * 29,394.004694357
7*8886949367051****
8*888746316811****
9*888803193284351****
10*Bill25104040****
11*Bill4100****
12*Anything2030****
13*45toy466496329394****
14********
15**custJan2011*****
16**custCMBJan2011*****
Sheet2
#VALUE!
</td></tr></table></td></tr></table>
 
Upvote 0
Ah...that's right. Makes sense. Thanks for pointing that out.

One thing I'm noticing in some instances now that I've built out more data is...I'm getting values that are being duplicated. As you can see its working on a large amount of data and doing exactly what I expected; however, it's spitting back instances like this:

<table style="font-family:Calibri,Arial; font-size:11pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; " border="1" cellpadding="0" cellspacing="0"><tbody><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td>
</td><td>A</td><td>B</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">1</td><td style="text-align:left; ">72</td><td>
</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">2</td><td>
</td><td>
</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">3</td><td>
</td><td>
</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">4</td><td colspan="2" style="text-align:center; ">Jan-11</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">5</td><td style="text-align:left; ">Customer</td><td> Combined </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">6</td> <td style="text-align:left; ">Customer A</td> <td style="text-align:right; "> 24,836,503 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">7</td><td style="text-align:left; ">888</td><td style="text-align:right; "> 102,911,262 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">8</td> <td style="text-align:left; ">Customer B</td> <td style="text-align:right; "> 43,503,567 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">9</td> <td style="text-align:left; ">Customer C</td> <td style="text-align:right; ">1,453</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">10</td> <td style="text-align:left; ">Customer D</td> <td style="text-align:right; "> 914,409 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">11</td> <td style="text-align:left; ">Customer D</td> <td style="text-align:right; "> 914,409 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">12</td> <td style="text-align:left; ">Customer E</td> <td style="text-align:right; ">203</td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">13</td> <td style="text-align:left; ">Customer F</td> <td style="text-align:right; "> 584 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">14</td> <td style="text-align:left; ">Customer G</td> <td style="text-align:right; "> 36,213,785 </td></tr><tr style="height:18px ;"><td style="font-size:8pt; background-color:#cacaca; text-align:center; ">15</td> <td style="text-align:left; ">Customer G</td> <td style="text-align:right; "> 36,213,785 </td></tr></tbody></table>
<table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tbody><tr><td>Spreadsheet Formulas</td></tr><tr><td><table style="font-family:Arial; font-size:9pt;" border="1" cellpadding="2" cellspacing="0"><tbody><tr style="background-color:#cacaca; font-size:10pt;"><td>Cell</td><td>Formula</td></tr><tr><td>A1</td><td>=SUMPRODUCT((custJan2011<>"")/COUNTIF(custJan2011,custJan2011&""))</td></tr><tr><td>A6</td><td>{=IF(ROWS($A6:A6)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A6)+1),ROWS($A6:A6))))}</td></tr><tr><td>B6</td><td>=IF($A6="","",SUMPRODUCT((custJan2011=$A6)*(custCMBJan2011)))</td></tr><tr><td>A7</td><td>{=IF(ROWS($A$6:A7)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A7))))}</td></tr><tr><td>B7</td><td>=IF($A7="","",SUMPRODUCT((custJan2011=$A7)*(custCMBJan2011)))</td></tr><tr><td>A8</td><td>{=IF(ROWS($A$6:A8)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A8))))}</td></tr><tr><td>B8</td><td>=IF($A8="","",SUMPRODUCT((custJan2011=$A8)*(custCMBJan2011)))</td></tr><tr><td>A9</td><td>{=IF(ROWS($A$6:A9)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A9))))}</td></tr><tr><td>B9</td><td>=IF($A9="","",SUMPRODUCT((custJan2011=$A9)*(custCMBJan2011)))</td></tr><tr><td>A10</td><td>{=IF(ROWS($A$6:A10)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A10))))}</td></tr><tr><td>B10</td><td>=IF($A10="","",SUMPRODUCT((custJan2011=$A10)*(custCMBJan2011)))</td></tr><tr><td>A11</td><td>{=IF(ROWS($A$6:A11)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A11))))}</td></tr><tr><td>B11</td><td>=IF($A11="","",SUMPRODUCT((custJan2011=$A11)*(custCMBJan2011)))</td></tr><tr><td>A12</td><td>{=IF(ROWS($A$6:A12)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A12))))}</td></tr><tr><td>B12</td><td>=IF($A12="","",SUMPRODUCT((custJan2011=$A12)*(custCMBJan2011)))</td></tr><tr><td>A13</td><td>{=IF(ROWS($A$6:A13)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A13))))}</td></tr><tr><td>B13</td><td>=IF($A13="","",SUMPRODUCT((custJan2011=$A13)*(custCMBJan2011)))</td></tr><tr><td>A14</td><td>{=IF(ROWS($A$6:A14)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A14))))}</td></tr><tr><td>B14</td><td>=IF($A14="","",SUMPRODUCT((custJan2011=$A14)*(custCMBJan2011)))</td></tr><tr><td>A15</td><td>{=IF(ROWS($A$6:A15)>$A$1,"",INDEX(custJan2011,SMALL(IF(FREQUENCY(IF(custJan2011<>"",MATCH(custJan2011&"",custJan2011&"",0)),ROW(custJan2011)-ROW('PEPM Extract 2011'!$A$9)+1),ROW(custJan2011)-ROW($A$6)+1),ROWS($A$6:A15))))}</td></tr><tr><td>B15</td><td>=IF($A15="","",SUMPRODUCT((custJan2011=$A15)*(custCMBJan2011)))</td></tr></tbody></table></td></tr><tr><td>Formula Array:
Produce enclosing
{ } by entering
formula with CTRL+SHIFT+ENTER!
</td></tr></tbody></table>

Excel tables to the web >> Excel Jeanie HTML 4
 
Upvote 0
Post your ranges, there seem to be some inconsistency. I ran the formula with 3000 line and I received 200 unique name. No duplicate was found in the unique list of names.
 
Upvote 0

Forum statistics

Threads
1,224,618
Messages
6,179,919
Members
452,949
Latest member
beartooth91

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