I have to admit that I am lost to how this could be done. I have a worksheet with names in column 1 that will go down at least by 5000 rows (within the next 5 years). I then have a range of 39 columns (from column K to AW) that gets checked every time the name is entered more than once. In that range, the top cell has a different value and is always the same (they are room numbers).
What I want is to find the MAX in a row within the range and then enter into a cell which column has the highest value. So, say there is Bob in row 5, I want to find the maximum value in range K5:AW5. Say column L (a value of 3 let's say) has the highest value with 8, I want 3 to be placed in cell(5,9). If column P has the highest value with 10, I want to place 7 in cell(5,9).
*Further info if needed
How the names get entered is through a userform. People enter the name and the room number. Every time a name gets entered, it searches for the name in column 1 and then adds 1 to the room number they are entering. The first time they get entered their name gets placed in column 1 and other statistics gets placed as well. If need be I could place a formula here to have MAX entered into column 9.
Variables in userform:
The variable for name is: GuestName
The variable for the room is: Roomnum
I thought I could do something like this in the userform:
Then in the worksheet change function, it can match Cell(Tot,10) and to the number in the range and place in column 9 the value for the top of the cell.
Bookmarks