Results 1 to 4 of 4

Thread: formula help

  1. #1
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Saudi Arabia
    Posts
    322
    Thanks
    1
    Thanked 0 Times in 0 Posts

    formula help

    hellow all,
    i have the data in column a and i want a formula that produce the results in column b. the equestion should enter "flower" and "sand" cat sequesnce if there a repatitive names in a,a1=a2, else enter flower as cat.

    NAME CAT
    CHEV FLOWER
    CHEV SAND
    CORP FLOWER
    CORP SAND
    RASK FLOWER
    RASK SAND
    KOBR FLOWER
    RAMS FLOWER
    RAMS SAND
    TIA
    dubdub

  2. Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,224
    Thanks
    14
    Thanked 341 Times in 334 Posts
    Not sure I understand completely, but if the first column of items is in Col A, in B2 you can enter:
    =INDEX({"FLOWER","SAND","3rd Item","4th Item"},COUNTIF($A$2:$A2,A2))

    And this will replicate your output. You only put the first 2 items, I added a 3rd and 4th in case your list would include more repeats, the array can be extended as desired...

    Steve

  4. #3
    3 Star Lounger
    Join Date
    Jul 2005
    Location
    Saudi Arabia
    Posts
    322
    Thanks
    1
    Thanked 0 Times in 0 Posts
    As always perfect. Great thanks Steve.
    TIA
    dubdub

  5. #4
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,224
    Thanks
    14
    Thanked 341 Times in 334 Posts
    You are welcome.
    An alternate and easier to maintain method would be to create a list of the items in a range, and then use that range reference rather than the explict "array list" in each formula.

    Steve

Posting Permissions

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