+ Reply to Thread
Results 1 to 4 of 4

Formula to append a character to the end of the result if result already exists above?

  1. #1
    Forum Contributor
    Join Date
    08-22-2013
    Location
    USA
    MS-Off Ver
    MS Office for Office 365 (Latest - 32-bit)
    Posts
    107

    Formula to append a character to the end of the result if result already exists above?

    Hi,

    I think I've laid out very clearly in the attachment what kind of formula I'm trying to accomplish, but just for good order - when linking to a value on another sheet, I want to append a character to the end of the resulted value if that value already exists in any of the rows above. The kind of tricky part is it has to look at information in TWO different columns to determine if it's a duplicate.

    Please take a look at the attachment and let me know if any questions.

    Thanks!!

  2. #2
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: Formula to append a character to the end of the result if result already exists above?

    Enter this formula in K2 then copy down and pull it to the right.

    =IF(AND(ISNUMBER(SEARCH("-",A2)),IF(ISNUMBER(A2),"",COUNTIF(A$2:A2,A2))=2),A2&"(b)",A2)
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  3. #3
    Forum Contributor
    Join Date
    08-22-2013
    Location
    USA
    MS-Off Ver
    MS Office for Office 365 (Latest - 32-bit)
    Posts
    107

    Re: Formula to append a character to the end of the result if result already exists above?

    Quote Originally Posted by AlKey View Post
    Enter this formula in K2 then copy down and pull it to the right.

    =IF(AND(ISNUMBER(SEARCH("-",A2)),IF(ISNUMBER(A2),"",COUNTIF(A$2:A2,A2))=2),A2&"(b)",A2)
    Hi AlKey, thanks for your prompt reply. I notice though that your formula doesn't make any reference to cell B2 anywhere. The appending of the "(b)" should be dependent on the values in both A2 and B2 being duplicated in rows above. I did try it anyway just to be sure, and I've confirmed that we still need to consider B2 somewhere in the formula...

    Many thanks.

  4. #4
    Forum Contributor
    Join Date
    08-22-2013
    Location
    USA
    MS-Off Ver
    MS Office for Office 365 (Latest - 32-bit)
    Posts
    107

    Re: Formula to append a character to the end of the result if result already exists above?

    Sorry, in case it's not clear in my example, the reason column B data needs to be considered is because there will be cases where two values in column A will be the same but column B for those 2 given rows may actually have different data, in which case we don't want the (b) appended.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Code result wrong but formula correct result
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-11-2014, 12:26 PM
  2. [SOLVED] Help with Formula using variable as Date and result as integer, error in my result
    By Elomaldo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-22-2014, 04:20 PM
  3. Vlookup where more than one result exists
    By elmuziko in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-06-2013, 10:29 AM
  4. isblank & vlookup formula returns #n/a result and incorrect result
    By helpmeplease333 in forum Excel General
    Replies: 5
    Last Post: 05-06-2012, 11:41 PM
  5. Macro - Find Duplicates & Append to 1st Result
    By Burtono in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2011, 11:34 PM
  6. Advanced formula - Return result & Show Cell Reference of result
    By Irv in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-05-2006, 10:40 PM
  7. look up and append result to row for multiple identical entries
    By as_sass in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2005, 04:11 PM

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