jwpiii
04-03-2007, 11:43 AM
New to VBA and new to vbaexpress.com so please be kind!!!
Our company uses a piece of software that will generate reports in an Excel format. I am generating two different reports that have the same format but different data. when the reports are generated the system creates a unique name each time. I am copying the data using Paste Special (Values) to two different sheets in the same workbook. The first sheet is named Female and the second is named Male. I need to consolidate Female and Male into a master list named Treatment Prices without duplicates. I can copy all of Female to Treatment Prices and then would like to compare Male and append those rows that are not present to the end of Treatment Prices. Then when finished appending I would like to resort the list.
Column b is the Description which is unique to the list. and column F contains the price that I need in the consolidated list as well.
The range always starts on row 10 and the ending range will vary. The description "TREATMENT TOTAL" is always present in Column B 2 rows after the last item.
I assume that the routine would calculate the range of items for Female and copy columns B and F to Treatment Prices. Then it would look at each item in Male and look to see if it is present on Treatment Prices. If it is it would continnue to the next item, if not it would add a new item containing the description and the price to Treatment Prices and search again. When finished appending items, the list would be resorted in ascending order.
Hope this makes sense and Thanks in advance for your help.
John
Our company uses a piece of software that will generate reports in an Excel format. I am generating two different reports that have the same format but different data. when the reports are generated the system creates a unique name each time. I am copying the data using Paste Special (Values) to two different sheets in the same workbook. The first sheet is named Female and the second is named Male. I need to consolidate Female and Male into a master list named Treatment Prices without duplicates. I can copy all of Female to Treatment Prices and then would like to compare Male and append those rows that are not present to the end of Treatment Prices. Then when finished appending I would like to resort the list.
Column b is the Description which is unique to the list. and column F contains the price that I need in the consolidated list as well.
The range always starts on row 10 and the ending range will vary. The description "TREATMENT TOTAL" is always present in Column B 2 rows after the last item.
I assume that the routine would calculate the range of items for Female and copy columns B and F to Treatment Prices. Then it would look at each item in Male and look to see if it is present on Treatment Prices. If it is it would continnue to the next item, if not it would add a new item containing the description and the price to Treatment Prices and search again. When finished appending items, the list would be resorted in ascending order.
Hope this makes sense and Thanks in advance for your help.
John