+ Reply to Thread
Results 1 to 9 of 9

change display value but leave entered value same

Hybrid View

  1. #1
    Registered User
    Join Date
    02-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Question change display value but leave entered value same

    Hi

    I would like to be able to enter numeric values into cells and have them display text without changing the numeric value. Is this at all possible?

    Enter 1 into a cell which intern displays Yes but when the cell is selected 1 is the true value.

    I did find a code that was similar to to what I wanted, however it changed the cell value to the displayed value.
    Last edited by cobbswobble; 02-17-2012 at 06:56 AM.

  2. #2
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: change display value but leave entered value same

    No expert but I don't think that's possible. However, if you're running code then what's wrong with:

    
    If range("a1").value = "Yes" then VARIABLE = 1

  3. #3
    Registered User
    Join Date
    02-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: change display value but leave entered value same

    Thanks Swoop.

    There is probably nothing wrong with it but sadly I'm a newbie when it comes to VBA and have no idea where to put it lol
    Trying to find the code I originally found on a forum somewhere, but I feel I may have not saved it

    Quote Originally Posted by swoop99 View Post
    No expert but I don't think that's possible. However, if you're running code then what's wrong with:

    
    If range("a1").value = "Yes" then VARIABLE = 1

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: change display value but leave entered value same

    how many different number/texts do you have?

    Why do you need to store 1 and display Yes. Maybe you could explain the purpose of your approach.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    02-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: change display value but leave entered value same

    Sorry, my post was a little vague.

    I have two, yes and no.

    Currently @ work we are managing all our orders, stock etc via an excel workbook.
    We would like to add some conditional formatting using icon sets, bars etc but have found that excel doesn't allow you to set criteria against 'text' data.
    Some people are still using excel 2000 so we are unable to change the display values to 1/2 as we need to accommodate for all users and 1/2 will make little sense to many using excel 2000.
    I thought if it was possible to change the display text, this would allow the people who are using 2007 up to view the conditional formatting as required and the rest to be able to view the data as required.

    Quote Originally Posted by Andy Pope View Post
    how many different number/texts do you have?

    Why do you need to store 1 and display Yes. Maybe you could explain the purpose of your approach.

  6. #6
    Forum Contributor
    Join Date
    06-16-2011
    Location
    London
    MS-Off Ver
    Excel XP
    Posts
    276

    Re: change display value but leave entered value same

    What Andy said.

    It may be easier for you to have the "1" stored in another cell (in white so users can't see it) and have an "if" statement in the cell you want a "yes".

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: change display value but leave entered value same

    hi cobbswobble, do you mean sort of that? If yes it can be done with user-defined format, check attachment.
    Attached Files Attached Files

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: change display value but leave entered value same

    Explanation helped, thank you.

    So like this then, see attached.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: change display value but leave entered value same

    That's exactly what I wanted.

    Thanks for the help! really appreciated!

    Quote Originally Posted by Andy Pope View Post
    Explanation helped, thank you.

    So like this then, see attached.

+ 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