Returning a date from a range

pbyrne462

New Member
Joined
Apr 13, 2011
Messages
17
I have a set of three criteria, Product, Country, Date

My data appears like this:

Product 1 Country 1 01JAN11
Product 2 Country 2 01APR11
Product 3 Country 3 01JUL11
Product 4 Country 4 01OCT11

I have a seperate table which I want to sequence the countries depending on the quarters, so I have 4 columns. I need to look at the table above speficically the dates and return them in sequence depending on if they are in quarter 1 to 4. So following the example above I would have a resulting table that contains Country 1 in Q1, Country 2 in Q2 etc.

Hope this makes sense and I hope someone can help.
 
The ROW()-ROW($F$2) part generates a number of 1 or 2 or 3 etc depending on how far down the output table the formula is.

The longer one: MATCH($F$1,$D$2:$D$14,0)+ROW()-ROW($F$2)-1)
is to make a pointer into the source table, offsetting from the first occurence of the required Quarter by 0 or 1, or 2, or 3 etc ... depending on how far down the output table the formula is ( note that this offset is one less than the other generated number of 1, 2 or 3, by design ).
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,224,603
Messages
6,179,850
Members
452,948
Latest member
UsmanAli786

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