Pinkster69
New Member
- Joined
- Jun 19, 2012
- Messages
- 48
Hi Guys,
I have been wrecking my head with the following! hope you guys can help?
I am trying to look for some VBA Code so that I can search multiple values in Column "A" based on the criteria in Textbox1 and SUM up the corresponding values in Column "B" based of course on the criteria in Textbox1 and display them in Textbox2.
For example if I have multiple Part Numbers in Column "A" and there is a lot of duplicates and the prices of those parts are in column "B". If for example I enter a Part Number in Textbox1 "552", the code will search column "A" for all the Part Numbers that are "552" and sum up the corresponding prices based on the Part Number "552" in column "B" and display this in Textbox2. The trigger for this would be a commandButton1.
Just as a note, there might be some blank cells in both columns so it would be great if the code could allow for this.
Thanks in advance!
Pinkster69
I have been wrecking my head with the following! hope you guys can help?
I am trying to look for some VBA Code so that I can search multiple values in Column "A" based on the criteria in Textbox1 and SUM up the corresponding values in Column "B" based of course on the criteria in Textbox1 and display them in Textbox2.
For example if I have multiple Part Numbers in Column "A" and there is a lot of duplicates and the prices of those parts are in column "B". If for example I enter a Part Number in Textbox1 "552", the code will search column "A" for all the Part Numbers that are "552" and sum up the corresponding prices based on the Part Number "552" in column "B" and display this in Textbox2. The trigger for this would be a commandButton1.
Just as a note, there might be some blank cells in both columns so it would be great if the code could allow for this.
Thanks in advance!
Pinkster69