#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,276
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,670
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program Speed - Arrays Searching vs. Row Searching CWillis Excel Programming 8 June 4th 09 06:42 PM
Searching, matching then searching another list based on the match A.S. Excel Discussion (Misc queries) 1 December 13th 06 05:08 AM
VBA searching kirkm[_6_] Excel Programming 8 September 17th 06 06:13 PM
Searching Viktor Ygdorff Excel Programming 1 July 12th 06 02:46 PM
Searching DQ05 Excel Worksheet Functions 1 September 24th 05 06:08 PM


All times are GMT +1. The time now is 06:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"