ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   searching (https://www.excelbanter.com/excel-programming/434154-searching.html)

Eric

searching
 
I am trying to set up a macro to do the following.

I need to type in the date, the plant, and mix type and have a result of
tons show up.
IE:
B8=date D8= plant H8=mix type J8=result

B8=12/2/09 <~~~Enter this
D8=Groton <~~~Enter this
H8=9.5 <~~~Enter this
J8=600 <~~~Return this (answer)

Search area looks like this
A B C D
12/2/09 Montville 12.5 400
12/2/09 Groton 12.5 500
12/2/09 Groton 9.5 600
10/22/09 Danbury 19.0 700

I hope this makes sense. Any help would be greatly appreciated.
I am not looking to autosum. I am only looking to retrieve the tons
produced from that particular day, plant, and mix type.

Thank you in advance

Eduardo

searching
 
Hi,
you don't need a macro in J8 enter

=SUMPRODUCT(--(F1=sheet2!A1:A3000),--(F2=sheet2!B1:B3000),--(F3=sheet2!C1:C3000),sheet2!D1:D3000)

I assume that your formula is in sheet1 and the table with the data in sheet2
change range to fit your need

"Eric" wrote:

I am trying to set up a macro to do the following.

I need to type in the date, the plant, and mix type and have a result of
tons show up.
IE:
B8=date D8= plant H8=mix type J8=result

B8=12/2/09 <~~~Enter this
D8=Groton <~~~Enter this
H8=9.5 <~~~Enter this
J8=600 <~~~Return this (answer)

Search area looks like this
A B C D
12/2/09 Montville 12.5 400
12/2/09 Groton 12.5 500
12/2/09 Groton 9.5 600
10/22/09 Danbury 19.0 700

I hope this makes sense. Any help would be greatly appreciated.
I am not looking to autosum. I am only looking to retrieve the tons
produced from that particular day, plant, and mix type.

Thank you in advance


Eric

searching
 

Eduardo,
This worked like a champ. Thank you so much!
I would like to carry this one step further if possible.

In the formula you just gave me a tonnage will show up given certain
parameters. I also have a tonnage that I want to post next to the given
tonnage.

EX:
Sample of Sheet 1 is below Columns A1:D3 are already filled in from a
previous day. On sheet 3 I have put in the date, job, mix and the tons pop
up (column D), and now I imput the new tons next to the poped up tonnage. I
now want to post only the new tons on to sheet 1(Column E) under the
appropriate date, mix type, and job.
A B C D E
1 Date Job Mix Tons New Tons
2 2/2/09 1 12.5 10
3 2/2/09 2 12.5 20 12
4 7/8/09 1 9.5 30
5 7/9/09 3 9.5 10

I hope this makes sense.

"3Eduardo" wrote:

Hi,
you don't need a macro in J8 enter

=SUMPRODUCT(--(F1=sheet2!A1:A3000),--(F2=sheet2!B1:B3000),--(F3=sheet2!C1:C3000),sheet2!D1:D3000)

I assume that your formula is in sheet1 and the table with the data in sheet2
change range to fit your need

"Eric" wrote:

I am trying to set up a macro to do the following.

I need to type in the date, the plant, and mix type and have a result of
tons show up.
IE:
B8=date D8= plant H8=mix type J8=result

B8=12/2/09 <~~~Enter this
D8=Groton <~~~Enter this
H8=9.5 <~~~Enter this
J8=600 <~~~Return this (answer)

Search area looks like this
A B C D
12/2/09 Montville 12.5 400
12/2/09 Groton 12.5 500
12/2/09 Groton 9.5 600
10/22/09 Danbury 19.0 700

I hope this makes sense. Any help would be greatly appreciated.
I am not looking to autosum. I am only looking to retrieve the tons
produced from that particular day, plant, and mix type.

Thank you in advance



All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com