Sum-ifs or v-lookup question: return one value per multiple/varying dates

Novellas

New Member
Joined
Aug 15, 2012
Messages
41
I would like to have a formula that would sort through the Location & Date data, and for every unique date as it applies to a location, return to a new sheet a single location value; For Ex: for Paris, it shows 3 dates (2/1), I'd like for the formula to return one Paris even though are 3 corresponding dates (just want one instance of the location per unique date, even if multiple dates).

I was thinking v-lookup, but having no luck.

Thanks for any help.


LocationDate
Paris02/01/2013
Paris02/01/2013
Paris02/01/2013
Germany02/01/2013
Germany02/01/2013
Germany02/01/2013
Germany02/02/2013
Germany02/03/2013
Germany02/03/2013
Texas02/05/2013
Texas02/06/2013

<tbody>
</tbody><colgroup><col><col></colgroup>
 
...
You had mentioned there might be a quicker way to do this?--how's that?

Sheet1, A:B...
LocationDate
Paris2/1/2013
Paris2/1/2013
Paris2/1/2013
Germany2/1/2013
Germany2/1/2013
Germany2/1/2013
Germany2/2/2013
Germany2/3/2013
Germany2/3/2013
Texas2/5/2013
Texas2/6/2013

<colgroup><col style="width: 97pt; mso-width-source: userset; mso-width-alt: 4579;" width="129"> <col style="width: 85pt; mso-width-source: userset; mso-width-alt: 4010;" width="113"> <tbody>
</tbody>

Sheet2, A:C, the processing...

A2, just enter, copy across to B2, and down:

=IF($C2="","",INDEX(Sheet1!A$2:A$12,$C2))

C2, control+shift+enter and copy down:

=IFERROR(SMALL(IF(FREQUENCY(IF(Sheet1!$A$2:$A$12&"|"&Sheet1!$B$2:$B$12<>"", MATCH(Sheet1!$A$2:$A$12&"|"&Sheet1!$B$2:$B$12,Sheet1!$A$2:$A$12&"|"&Sheet1!$B$2:$B$12,0)),ROW(Sheet1!$A$2:$A$12)-ROW($A$2)+1),ROW(Sheet1!$A$2:$A$12)-ROW(Sheet1!$A$2)+1), ROWS(C$2:C2)),"")

This set up uses the array formula just once.
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
You can go to tools, macros, record new macro and then just do what you want to do. But this is a mathematical macro and so I wrote it from scratch. If you have never done BASIC programming it will be hard for you. I am willing to correspond off forum - PM me your Email if you want to.
 
Upvote 0
Aladin,

Regarding the formula above, I am having problems with it generating data beyond say 145 (even with more combinations present).

I've updated the array range, but when I copy across and drag down, it only returns say 20 or so data figures and then the rest are blanks...I'm not sure why this is.

The formual is present in these cells, but nothing is returned.

Any suggestions?
 
Upvote 0
Aladin,

Regarding the formula above, I am having problems with it generating data beyond say 145 (even with more combinations present).

I've updated the array range, but when I copy across and drag down, it only returns say 20 or so data figures and then the rest are blanks...I'm not sure why this is.

The formual is present in these cells, but nothing is returned.

Any suggestions?

Which set up did you use, that is, the one with concatenation or not?
 
Upvote 0

Forum statistics

Threads
1,215,054
Messages
6,122,893
Members
449,097
Latest member
dbomb1414

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