+ Reply to Thread
Results 1 to 18 of 18

Modify Unique List Array

  1. #1
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Modify Unique List Array

    Please Login or Register  to view this content.
    This the code. It goes through the data in a2-a20 and inputs it in row b2. I need it changed to go from A6-A200 and put into H6. When I change the values it gets all wonky

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Modify Unique List Array

    Try this alternative approach:

    Please Login or Register  to view this content.
    I1 can be moved to a more appropriate cell, just change reference to it in H6 accordingly... better to perform this calculation only once and refer to the result thereafter in other calcs as opposed to recalculating it in every formula in H6 onwards.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Modify Unique List Array

    =if(sum(if($a$6:$a$200<>"",--iserror(match($a$6:$a$200,$h$5:h5,0)))),
    index($a$6:$a$200,
    min(if($a$6:$a$200<>"",if(iserror(match($a$6:$a$200,$h$5:h5,0)),
    row($a$6:$a$200)-row($a$6)+1)))),"")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Quote Originally Posted by DonkeyOte View Post
    Try this alternative approach:

    Please Login or Register  to view this content.
    I1 can be moved to a more appropriate cell, just change reference to it in H6 accordingly... better to perform this calculation only once and refer to the result thereafter in other calcs as opposed to recalculating it in every formula in H6 onwards.

    That works perfect. Great work

    I also need a similar list that will generate it based on a condition.

    For instance if a row is highlighted the list will form for all entries in the highlighted row and before

    IE Row 50 is highlighted the list will generate based on all values within the range a20-a50

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Modify Unique List Array

    You will need to elaborate in terms of what you mean by "highlighted" ... if by colour you will need to further elaborate in terms of any underlying logic that may cause row 50 to be highlighted in the first instance.

  6. #6
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Highlighted

    The user will manually highlight a row. The range will be from cell a3 including the highlighted row.

  7. #7
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Bump is this possible

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Modify Unique List Array

    Highlighting a row is a very HUMAN approach to visualizing data, not a solid method for a program, in my opinion.

    Can you consider a different method of determining the end of the a range, perhaps an entry in a cell?

    For instance, you could have a cell "E1" where you enter a particular row. Let's say you enter a 9 there.

    Prior to that you create a named range that will use that value as part of the named range. Click on Insert > Name > Define, enter the name you want to use, something like NameRange, and in the RefersTo: enter this formula:

    =INDIRECT("Sheet1!A3:A" & Sheet1!$E$1)

    You could create an additional named range "ValueRange" with the formula to do math with, too:

    =INDIRECT("Sheet1!D3:D" & Sheet1!$E$1)

    Now you can use those range in a formula:
    =Sumproduct(--(NameRange="James"),ValueRange)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  9. #9
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Agreed.

    But the condition that the highlighting depends upon is the results of an auction data. Which would need to be entered manually. Thats why I thought the simpliest solution would be to simply just high light the row. If you have any suggestions then I would be happy to hear that

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Modify Unique List Array

    Quote Originally Posted by hassankhan View Post
    Agreed.

    But the condition that the highlighting depends upon is the results of an auction data. Which would need to be entered manually. Thats why I thought the simpliest solution would be to simply just high light the row. If you have any suggestions then I would be happy to hear that
    My solution is explained in full above.

  11. #11
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Okay let me rephrase

    Cell E1 will contain a percentage i.e., 97.25

    The code I am using is
    Please Login or Register  to view this content.
    What needs to happen... based on the value of cell e1. The codes range needs to be set to include all values less than and equal to e1. The row with the value equal to e1 needs to be automatically highlighted


    Thanks sorry for the confusion

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Modify Unique List Array

    E1 or ? I1

  13. #13
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Ideally H5 and the unqiue list will be in h10:h500

  14. #14
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Any ideas?

  15. #15
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Modify Unique List Array

    I don't understand where you're looking for the value (97.25%) ? Will the value in E1 ALWAYS be listed in "the" range ? If not are the values listed in order ?

    A sample would invariably quicken the process in terms of finding a resolution.

  16. #16
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Quote Originally Posted by DonkeyOte View Post
    I don't understand where you're looking for the value (97.25%) ? Will the value in E1 ALWAYS be listed in "the" range ? If not are the values listed in order ?

    A sample would invariably quicken the process in terms of finding a resolution.
    The rates are already arranged in ascending order.

    The value will always be listed in E1. Which will set the range

  17. #17
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Modify Unique List Array

    Might be an idea to post a representative sample file so we can see exactly what you mean - with a sample I'd say we can wrap this up in next to no time.

    (famous last words)

  18. #18
    Registered User
    Join Date
    07-30-2009
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    51

    Re: Modify Unique List Array

    Please Login or Register  to view this content.
    Right now the range is set from $A$6:$A$200. What needs to happen is the range needs to modified based on the value of e1.

    All cells are arranged in decending order by column F.

    I need it so that based on the value of e1. The range will be targeted to include all values that are equal and less then e1.

    So range =e1 and numbers less then e1.

    Then based on the range the unique list will be created based on the values from column a.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1