Posts by vhookup

    Hi All,

    It sounds simple and I'm sure it is, but I've gone back and forth last few days but cannot solve it. In a nutshell, I need to find Top 10 values from 2 columns, HOWEVER, I cannot have more than one max value in this list from the same row of the source data, it must be a strict one answer per row from the 10 highest value rows. I hope that makes sense?!

    My current Formula below returns values fine but I get a repeat where I don't need it please see the image link below:


    In this Example Table if the values in the "Count" column (K:K) are greater than a value in the "Max" column (L:L) then it needs use the Values in Count Column (K:K), but do not repeat the value adjacent in Column L:L further down the Top 10 (147 at 20:30:00 is not wanted in this example list but the two highlighted 138's are fine). The cells pictured to the right which are headed Time and Top10 are I29:J39 in the example sheet attached Countsheet.xlsx

    Previously I have been running a formula for a while top get top 'x' values from a single column. This formula (in a different file) located in AD6 copied down as far as needed (10rows in this case) uses the number input in AD3 to determine a Top 'x' - The code below worked well for this situation along with a formula in the adjacent cells to extract the Day, Date and Time this max value occurred.


    Thank you in advance for the help.

    Hi Roy, I've tried this with multiple lines and to multiple sheets, it works - very much on the right track. I've just seen the new message now though. Just trying to understand what does what at the moment.

    Thank you Very much for your help!


    I'll try to be brief and to the point.

    I have a user form and several target sheets.

    User form has 3 different ComboBox and 1 type of textbox. Combobox 1 is Sheet (exclude this from this question, this will be used to select different sheets to send the data to - but I'll be able to sort this code out), Combobox2 is Day and Combobox3 is month, Textbox1 will be a number.

    The sheets are essentially yearly calendars Columns (D:O) are months, Column C contains days of the month (1-31 in C17:C47).

    I would like the number in textbox to be added to the intersection of the Month and Day i.e. Jan 1 selected via the comboboxes and 10 input in Textbox, this would then appear in the intended sheet in Cell D17.

    My mind is boggled, researched for weeks, I've adapted code from a previous project which did a similar thing but was looking in 2 columns from labels on a userform rather than 1 column and 1 row using comboboxes and it was also using lastrow, which i don't think is the solution, but I've found nothing that works or any other suggestions online.

    If i'm barking up the wrong tree could you please point me in the right direction? (it might be worth noting that there are 10 of each combobox and textbox on the user form -apart from the sheet combo- to allow for multiple entries upon loading the form) Below is what I have so far - various bits have been removed where the