Forestq

Active Member
Joined
May 9, 2010
Messages
482
Hi,

how can I add second MATCH into below function:

Code:
OFFSET(Sheet2!$BS$1,MATCH(Sheet1!$H$9,Sheet2!$BR$2:$BR$402,0),0,COUNTIF(Sheet2!$BR$2:$BR$402,Sheet1!$H$9),1))

example: If in one field I select Austria, and in second field I select Wien, I want to have in third filed ALL STREAT for Wien.

CountryCityStreet
AustriaWienBohemo
AustriaWienThenok
AustriaWienFilator
AustriaLienzAbud
AustriaLienzOksor

<tbody>
</tbody>
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I am not so sure what you really need.
What comes to my mind is that you probably already have what you need. The reason is that typically name of the city determines the name of the country uniquely. So if the user chooses "Austria, Wien" you may simply process only Wien, because there is no other Wien in Europe.
So if you check and verify, that you never have the same town name in two different countries, the solution is to forget about the country.

Pozdrowienia,

J.Ty.
 
Upvote 0
Hi J.Ty.,

maybe my example was wrong. Here is other:
CountryYearCode
Austria1999A1
Austria2000AB
Austria2000AG
Austria2001ZZ
Austria2002ZH
Poland1998A4
Poland2000AZ
Poland2000AF
Poland2001KL

<tbody>
</tbody>

Now, when I select Austria, then in first field I have list with Year. When I select year = 2000 I should have list:
AB, AG (for Austria).

Note, that "2000 Year" can occur couple times (for other country).
 
Upvote 0
Hi J.Ty.,

maybe my example was wrong. Here is other:

[...]

Now, when I select Austria, then in first field I have list with Year. When I select year = 2000 I should have list:
AB, AG (for Austria).

Note, that "2000 Year" can occur couple times (for other country).

Not sure about the purpose. Taking it up as creating a sublist on demand...

CountryYearCode Austria
Austria1999A1 2000
Austria2000AB CODES
Austria2000AG AB
Austria2001ZZ AG
Austria2002ZH
Poland1998A4
Poland2000AZ
Poland2000AF
Poland2001KL

<COLGROUP><COL style="WIDTH: 64pt; mso-width-source: userset; mso-width-alt: 3043" width=86><COL style="WIDTH: 48pt" span=3 width=64><COL style="WIDTH: 78pt; mso-width-source: userset; mso-width-alt: 3697" width=104><TBODY>
</TBODY>

E4, control+shift+enter, not just enter, and copy down:
Rich (BB code):
=IFERROR(INDEX($C$2:$C$10,SMALL(IF($A$2:$A$10=E$1,IF($B$2:$B$10=E$2,
  ROW($C$2:$C$10)-ROW($C$2)+1)),ROWS($C$2:C2))),"")
 
Upvote 0
Hi,

I have made your example data into a working spreadsheet. Please have a look and test it. At the moment data validation covers the first 10 rows in the first tab. The second tab contains your data converted into a form which is necessary for the validation to work, and a manual how to prepare it yourself.
Get the spreadsheet from here: http://www.mimuw.edu.pl/~jty/MrExcel/countries-years-codes.xlsx

Pozdrowienia,
J.Ty.
 
Upvote 0
what is mean A4, B4?

Code:
=OFFSET(Start,COUNTIF(ColD,"<"&A4)+COUNTIFS(ColD,A4,ColE,"<"&B4),5,COUNTIFS(ColD,A4,ColE,B4))
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,818
Members
449,049
Latest member
cybersurfer5000

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