Posted to microsoft.public.excel.programming
|
|
Complicated Sort-Compare-Delete Question
Hi John
I am going to be offline from now until Monday morning Australian Eastern
Standard Time. I'll check back then
Regards
Rowan
"Rowan" wrote:
Hi John
I am not sure I have completely understood your question.
The way it is currently working is to check the Manufacturer in column K,
the model in Column L and the Price in column P. It these are all the same
then the quantities in column N are added together and the extra line is
deleted. So if you had 3 records with a qty of 1 each and the same
manufacturer, model and price you will be left with one record with a qty of
3. That is how it is currently working for me.
If one of the prices is different then you should be left with two records
one with a qty of 2 and the other with 1. It should do that currently. Is
this what you are after or do you want all three of those records added
together? If this is the case, which price would you keep?
Regards
Rowan
"JohnNiman" wrote:
Rowan,
THANK YOU! :)
It works *almost* perfectly. I think that the comparison formula is
missing something though. If, for instance, I have three items, all of
which have the same model number, description and quantity ordered, but
for some reason one of the prices is different, they are all combined
under one heading with quantity of three, as opposed to two headings
with quantities on 2 and 1.
Did that make sense?
Any thoughts on how to add that?
On a side note, I know my code is horribly sloppy. I've got the basics
of VBA down, but this has been chopped together from recording and
manipulating what I want and looking for examples on the internet.
Someone who really knew what they were doing could probably cut 100
lines out ;)
Thank you again, I appreciate the help a lot.
--
JohnNiman
------------------------------------------------------------------------
JohnNiman's Profile: http://www.excelforum.com/member.php...o&userid=25366
View this thread: http://www.excelforum.com/showthread...hreadid=390774
|