I have racked my brain over this for a few hours now and I'm at a loss. I have a list of locations in column A, a list of totals in column B - the totals are a sumifs function based on credit card data - but I'm not sharing that data, so I filled in with fake numbers.
The idea is there are 2 deposits amounts for each location - each total is a sum of deposits for a specific day. I need to put a 1 or a 2 in the count column based on the the totals. 1 will be for the larger of the two amounts. so for example,
cells A2:A26 are Charlotte
cells B2:B26 are totals for Charlotte, but cells A2:A9 is one day and cells A10:A26 is the next day.
I would put "2" in cells F2:F9 and a "1" in cells F10:F26. I would continue to do the same for the different locations. if a location only has 1 total, it would be a 1. if the type is a refund, it would not have a number. These numbers run a totally separate formula on another page in a larger workbook.
I have used the exact function in column C to see if the row above matches the location then the total. If the result is FALSE FALSE - I know its a new location and to put a "n" in column D and put the total in column E. I am having trouble either with a formula or VBA to compare the values for the same location in column E. the issue is the row amounts are not consistent. This report is done every Monday, and could have more or less rows for the same location and same day. Rows cannot be deleted, because of the sumifs function that pulls the totals. Deleting rows would also delete the data to pull those totals.
I have attached an example workbook. I took the VBA I wrote out because all it did was hide and unhide rows and columns with a loop and was not helpful.
Bookmarks