+ Reply to Thread
Results 1 to 7 of 7

Adding suffix to values based on multiple criteria.

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    81

    Adding suffix to values based on multiple criteria.

    I have attached a workbook with sample data and output. On Sheet1 I have values in ColA some of which I want to bring into Sheet2 and add the suffix "_xyz". I also want to bring in the values in the columns to the right. However, I want to bring over only those values in ColA with the following criteria:

    1. Values 6 digits in length
    2. The row sum is not equal to zero

    One of the issues I've had using a formula is that for values that do not meet the above criteria I have a blank cell. I need the output values to be contiguous.

    Thank you in advance for your help.

    MTT
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Adding suffix to values based on multiple criteria.

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: Adding suffix to values based on multiple criteria.

    John,

    It's not working but I think I can see your logic. I think maybe it's not specifying the values in Sheet1 to pull over to Sheet2?

    MTT

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Adding suffix to values based on multiple criteria.

    I only tested it on your sample rows:

    Please Login or Register  to view this content.
    And it worked for me on the sample you provided.

  5. #5
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,108

    Re: Adding suffix to values based on multiple criteria.

    Hello mosesthetank,

    I think that what JOHN H. DAVIS, has given you, works just fine.

    You may want to experiment with the slightly amended code as follows:

    In Cell F4 on Sheet1 enter "_xyz", which you may change as you wish, and prevents "hardcoding".

    Please Login or Register  to view this content.
    Regards.
    Last edited by Winon; 10-01-2014 at 03:37 PM. Reason: Added beeter explanaition about Cell F4 on Sheet1
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  6. #6
    Registered User
    Join Date
    04-23-2013
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    81

    Re: Adding suffix to values based on multiple criteria.

    Thank you very much John and Winon. It works beautifully.

  7. #7
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,108

    Re: Adding suffix to values based on multiple criteria.

    Hello mosesthetank,

    You are welcome. Glad we could help, and thank you for adding to my Reputation!

    Regards.

+ 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] Changing a positive or negative value based on the input's suffix, then removing suffix
    By Theredwind in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-06-2014, 05:19 AM
  2. Replies: 2
    Last Post: 10-05-2011, 12:43 PM
  3. adding values based on criteria
    By Brad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-06-2005, 11:05 AM
  4. adding values based on criteria
    By Brad in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  5. [SOLVED] adding values based on criteria
    By Brad in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-20-2005, 04:05 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