The attachment is very different from what you asked in post#01
1. columns are in a different sequence
2. 4 columns have now become 9 columns
3. discount column has been added
4. cell A1 previously was part of the table and now surrounded by blank cells
5. additional grand total at bottom of table
Several lines in the macro require amendments. Before I make those amendments can you clarify a few things:
Column headings - do they always appear in row7, starting in columnB. Can "A1" always be "B7"?
[CurrentRegion relies on having a table of continuous data to determine the last row - no blank rows or columns]
Discount column - in the attachment all values are zero. Is this ever used?
If not used - should the macro delete the column?
If it is used - please attach an example where there are values in discount column
[need to amend the calculation for total price to take account of discount if ever used]
"Total For Fruits" (in row18) - do these words always accompany the Fruit sub-total
[helpful in identifying where data finishes]
Final total - the grand total at the bottom of the sheet appears unnecessary - should the macro delete this?
[the only reason to retain this total would be for combined reporting of "Fruit" plus "non-Fruit" products]
Bookmarks