I am fairly new to programming macros and have a situation that is beyond what I normally create - any help would be greatly appreciated.
I have a stock report from our company's ERP that needs to be qualified and reformatted based on certain criteria. I have attached a sample for clarification.
Sheet1 shows what the report looks like after I run a preliminary scrubbing macro to remove blank rows and rows that are of no value. I've highlighted the information that I would like posted to a seperate sheet in the new format.
Here is the part that I'm struggling with...
The first couple records (marked on the file in red) have a List price value of 0 and therefore do no have a discounted price. I need the highlighted red cells of these records copied to a seperate sheet so we can go back and apply pricing to them later on - I've illustrated this on Sheet3.
The next four records (marked on the file in green) have some List price value and only a single discounted price. I need the highlighted green cells of these records copied to a seperate sheet in the appropriate columns, which I've shown on Sheet2.
Lastly, the next four records (marked on the file in blue) have some List price value and multiple discounted prices based on certain quantity breaks. I need the highlighted blue cells copied to the same sheet as mentioned in the previous paragraph (Sheet2), each cell in the appropriate columns.
As you can see from the raw data in Sheet1, the record types tend to be mixed. Also, the record types that have quantity discounts don't always have the same quantity breaks or even the same number of breaks. I need to somehow have a macro recognize these different record types as it runs through the file and take the appropriate action.
Can anyone help?
Bookmarks