+ Reply to Thread
Results 1 to 5 of 5

VBA to change text in a cell based on the value entered in another cell

  1. #1
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    VBA to change text in a cell based on the value entered in another cell

    Hi

    If a user selects a value from a drop down list A31 (data validation) the following list is displayed in 4 other cells (the values in the list will be different depending on what the user selects in A31). I now need to change this a bit and I'm stuck on how to do it. The code I have at the moment is shown below. The user only selects a value from cell A31 at the moment but what I need to happen is that is they select HL7 from A31 and enter a 1 in cell E22 the last line of text e.g. Range("A35").Value = "into… IntegrationH. HL7 integration inbound, outbound arrival & demographic message (price per Trust)" should then say Range("A35").Value = "into… IntegrationH. HL7 integration inbound, outbound arrival, demographic & outcome message (price per Trust)"

    Please Login or Register  to view this content.
    Is it possible to do this?

    Many thanks
    Karen

  2. #2
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA to change text in a cell based on the value entered in another cell

    Sorry, i dont fully understand, can you elaborate?
    Hope this helps

    Sometimes its best to start at the beginning and learn VBA & Excel.

    Please dont ask me to do your work for you, I learnt from Reading books, Recording, F1 and Google and like having all of this knowledge in my head for the next time i wish to do it, or wish to tweak it.
    Available for remote consultancy work PM me

  3. #3
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: VBA to change text in a cell based on the value entered in another cell

    Hi

    At the moment if the user selects HL7 from cell A31, cells A32:A35 are populated with the following options

    A32 = into… IntegrationE. Ensemble embedded version (price per kiosk)"
    A33 = "into… IntegrationH. HL7 integration inbound (price per Trust)"
    A34 = "into… IntegrationH. HL7 integration inbound & outbound arrival message(price per Trust)"
    A35 = "into… IntegrationH. HL7 integration inbound, outbound arrival & demographic message (price per Trust)"

    What I need to happen now is that is a user selects HL7 from cell A31 and also enters a number 1 in cell E22 the value in A35 should change from into… IntegrationH. HL7 integration inbound, outbound arrival & demographic message (price per Trust) to into… IntegrationH. HL7 integration inbound, outbound arrival, demographic & outcome message (price per Trust). If they don't enter a 1 in cell E22 the value in cell A35 should remain as into… IntegrationH. HL7 integration inbound, outbound arrival & demographic message (price per Trust). The values in cells A32:A34 remain unchanged regardless of what is entered in cell E22. I hope this makes more sense

  4. #4
    Valued Forum Contributor
    Join Date
    09-21-2011
    Location
    Birmingham UK
    MS-Off Ver
    Excel 2003/7/10
    Posts
    2,188

    Re: VBA to change text in a cell based on the value entered in another cell

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-23-2013
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: VBA to change text in a cell based on the value entered in another cell

    Fantastic - thank you, works perfectly

+ 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. Replies: 6
    Last Post: 05-08-2013, 07:56 AM
  2. [SOLVED] Change Row Background Colour When Text Is Entered Into A Cell
    By AlexRoberts in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2010, 01:28 PM
  3. How do i change the colour of a cell when text is entered
    By Deanobey in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 05-30-2009, 02:59 PM
  4. Auto change colour of cell when text / letter entered into cell
    By Nik_AU in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-26-2007, 07:36 AM

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