+ Reply to Thread
Results 1 to 4 of 4

Adding text to number only answer.

  1. #1
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Adding text to number only answer.

    Win 7
    XL2010
    I am using the following to extract text and numerical data from a databse (column 3 on different worksheets).

    =VLOOKUP($D54,CHOOSE(MATCH(LEFT($D54,1),{"A","F"},0),[Food_List_2011.xls]Alcohol!$A$1:$N$2000,[Food_List_2011.xls]Foods!$A$1:$N$2000),3,FALSE)

    When the answer is numerical only (when 'A' is selected, column 3 contains % AbV data), I wish add the text '% AbV' to the answer.
    When 'F' is selected, the answer is text only.
    If I use '&"% AbV"', it is added to both text and number answers.

    Any suggestions?

    Although a 2010 specific reply would be appreciated, I may have to export this file to pre-2007 users.

    TIA

    Alan
    Last edited by Zagra147; 01-21-2011 at 05:29 PM.

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

    Re: Adding text to number only answer.

    Perhaps:

    Please Login or Register  to view this content.
    though of course at that point the result will be a text string irrespective of whether A/F is active.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,218

    Re: Adding text to number only answer.

    You could try formating the recieving cells, but check if the formula is returning a number and not a string.
    Format > Custom
    Please Login or Register  to view this content.
    Alter the digits part to suit your needs.
    e.g.
    Please Login or Register  to view this content.
    This will remove the decimal digits

    Hope this helps
    Last edited by Marcol; 01-21-2011 at 06:52 PM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Forum Contributor
    Join Date
    10-10-2006
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2019, Win 10
    Posts
    102

    Re: Adding text to number only answer.

    Thanks, DonkeyOte.

    That works fine.

    Regards,

    Alan

+ 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