If small formula help?

samyscraps01

Board Regular
Joined
Jul 6, 2017
Messages
58
Hi, can i please get some help. I am trying to work out this formula, similar to the one i used earlier but now altered. In cell A2 I have concatenated data from cells A5 and B5. I did this because I have a mix of numbers and text. That formula lives in cell A2. In the category cell B4, that is a drop-down list with multiple categories, the same goes with cell A5, those will have multiple employees. Basically, what I would like to do is this, if I go to drop-down A5 and select a name, then go to category B5 and select anything in this case delivery on cell C5 give me the dates that are associated with that data. I know it needs to reference a second spreadsheet which will look like the chart next to this one.

Spreadsheet X
[TABLE="class: cms_table_grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A1[/TD]
[TD]B1[/TD]
[TD]C1[/TD]
[TD]D1[/TD]
[/TR]
[TR]
[TD]A2 Concatenated Data A5, B5[/TD]
[TD]B2[/TD]
[TD]C2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A3[/TD]
[TD]B3[/TD]
[TD]C3[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A4 EMPLOYEE[/TD]
[TD]B4 CATEGORY[/TD]
[TD]C4 DATES[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]A5 204Smith[/TD]
[TD]B5 Delivery[/TD]
[TD]C5[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Spreadsheet X, tab XYZ
[TABLE="class: cms_table, width: 500"]
<tbody>[TR]
[TD]Employee[/TD]
[TD]Delivery[/TD]
[TD]Pick-Up[/TD]
[TD]Purchase[/TD]
[/TR]
[TR]
[TD]204Smith[/TD]
[TD]1/12/18[/TD]
[TD][/TD]
[TD]2/10/18[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]








I would like something like this, I select 204Smith from the A5 drop-down menu and then Delivery from B5, therefore being referenced in cell A2 since it's concatenated and it should go into the same spreadsheet but tab xyz and go to cell A2 and then column and cell B2 and give me the date of 1/12/18 from that cell. I want it to do this everytime I changed the category. So, in other words, if I select purchase instead of delivery i want it to give the date 2/10/18 on cell C5.
 

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.
Sounds like you need a database backend and a real GUI program for the front end. There are systems like the one you describe that are coded over the course of years by a team of people. You just buy it and import your xl data in to the database.
 
Upvote 0
Hi,

Is this what you mean?


Book1
ABC
1
2Not Used in formula
3
4EMPLOYEECATEGORYDATES
5204SmithDelivery1/12/2018
6123JohnsonPick-up2/3/2018
7204SmithPick-up
8
9123JohnsonPurchase
10204SmithPurchase2/10/2018
11123JohnsonDelivery2/2/2018
Sheet1
Cell Formulas
RangeFormula
C5=IF(OR(A5="",B5="",SUMPRODUCT((XYZ!A$2:A$10=A5)*(XYZ!B$1:D$1=B5)*(XYZ!B$2:D$10))=0),"",SUMPRODUCT((XYZ!A$2:A$10=A5)*(XYZ!B$1:D$1=B5)*(XYZ!B$2:D$10)))



Book1
ABCD
1EmployeeDeliveryPick-UpPurchase
2204Smith1/12/20182/10/2018
3123Johnson2/2/20182/3/2018
XYZ
 
Upvote 0
What does this mean? =IF(OR(A5="",B5="", are those blanks? ""

The formula checks to see if there's any value in A5, B5, and corresponding cells in XYZ tab, if Not, results Blank, otherwise, continue formula.
 
Upvote 0
I got it!

=IF(OR($A$5="",$B$5="",SUMPRODUCT(('Raw Data'!$A$2:$A$29=$A$5)*('Raw Data'!$B$1:$O$1=$B$5)+($A$5="ALL")*('Raw Data'!$B$2:$O$29))=0),"",SUMPRODUCT(('Raw Data'!$A$2:$A$29=$A$5)*('Raw Data'!$B$1:$O$1=$B$5)*('Raw Data'!$B$2:$O$29)))

Notice that I added the section in red font. How can I get this as an array? As an example in the drop-down menu if I select the name of the person and in the next drop-down i select the category. I want to be able to select all and have it show me all the categories for that person which means it'll populate all the dates that correspond to each category for that particular person that I have selected on the drop-down. Does that make sense?
 
Upvote 0

Forum statistics

Threads
1,223,910
Messages
6,175,318
Members
452,634
Latest member
cpostell

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