Excel lookup using multiple criteria

kirandhawan

New Member
Joined
Jan 6, 2016
Messages
6
Hi,
Below is a sample table which I need to extract data from:
Event NameLocationFebFebFebFebFebFebFebFeb
04-Feb05-Feb06-Feb07-Feb08-Feb09-Feb10-Feb11-Feb
Event-1Loc-1YesYesYesYes
Loc-2YesYesYesYes
Loc-3Yes
Event-2Loc-1YesYes
Loc-2YesYes
Loc-3
Event-3Loc-1YesYes
Loc-2YesYes
Loc-3YesYes

<tbody>
</tbody>

From Above table, I need to extract a consolidated data in below format as the "yes" on a specific date may be shifted to some other date in master sheet and I need to automatically extracted data in below format in adjacent worksheet in the same master file:
Event NameLocation1st From Date1st To Date2nd From Date2nd To Date3rd From Date3rd To Date4th From Date4th To Date
Event-1Loc-104-Feb05-Feb08-Feb09-FebNullNullNullNull
Event-1Loc-205-Feb06-Feb10-Feb11-FebNullNullNullNull
Event-1Loc-307-Feb07-FebNullNullNullNullNullNull
Event-2Loc-1
Event-2Loc-2
Event-2Loc-3

<tbody>
</tbody>

can someone help me please?
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
can someone help me please?
If I understood you well, try the following:

Step 1
On Sheet1 original data start in A1
Range C3:J11 contains conditions Yes/empty

Event NameLocationFebFebFebFebFebFebFebFeb
04-Feb05-Feb06-Feb07-Feb08-Feb09-Feb10-Feb11-Feb
Event-1Loc-1YesYesYesYes
Loc-2YesYesYesYes
Loc-3Yes
Event-2Loc-1YesYes
Loc-2YesYes
Loc-3
Event-3Loc-1YesYes
Loc-2YesYes
Loc-3YesYes

<tbody>
</tbody>


Step2
Create a sheet with the name of "helper"
In range A1:H1 header set the dates.
In cell A2 put this formula. Copy the formula to the right and down
Rich (BB code):
=IF(Sheet1!C3="Yes";Sheet1!C$2;"")

04-Feb
05-Feb06-Feb07-Feb08-Feb09-Feb10-Feb11-Feb
04-Feb05-Feb08-Feb09-Feb
05-Feb06-Feb10-Feb11-Feb
07-Feb
07-Feb08-Feb
04-Feb09-Feb
04-Feb05-Feb
09-Feb10-Feb
06-Feb09-Feb

<tbody>
</tbody>


Step 3
On Sheet1 eg. in cell C16 put this ARRAY or CSE formula. Copy the formula to the right and down. You need finish formula with Ctrl+Shift+Enter (not just enter)
Rich (BB code):
=IFERROR(INDEX(helper!$A2:$G2;SMALL(IF(helper!$A2:$G2<>"";COLUMN(helper!$A2:$G2)-COLUMN(helper!$A2)+1);COLUMN(helper!A1)));"")

Event NameLocation1st From Date1st To Date2nd From Date2nd To Date3rd From Date3rd To Date4th From Date4th To Date
Event-1Loc-104-Feb05-Feb08-Feb09-Feb
Event-1Loc-205-Feb06-Feb10-Feb
Event-1Loc-307-Feb
Event-2Loc-107-Feb08-Feb
Event-2Loc-204-Feb09-Feb
Event-2Loc-3
Event-3Loc-104-Feb05-Feb
Event-3Loc-209-Feb10-Feb
Event-3Loc-306-Feb09-Feb

<tbody>
</tbody>


I hope that is help you

btw: Pay attention, you may need as a separator in the formula use a comma (,) instead of a semicolon (; )
 
Upvote 0

Forum statistics

Threads
1,215,781
Messages
6,126,863
Members
449,345
Latest member
CharlieDP

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