+ Reply to Thread
Results 1 to 5 of 5

If Range ("A1) = "TEXT1" Then Range ("A2) = "TEXT 2"

  1. #1
    Registered User
    Join Date
    06-13-2018
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    33

    If Range ("A1) = "TEXT1" Then Range ("A2) = "TEXT 2"

    I am having an issue that appears to be a simple request but I am experiencing some problems.


    In short, I am trying to input text from a dropdown into a cell i.e. B3 based on the value of another dropdown in another cell i.e. B2. My current code is
    HTML Code: 
    Ideally, I am looking to include multiple options for the B2 value i.e. OPTION A & OPTION C, but this would still return the same value in B3 (OPTION X).

    However, this errors and the Excel shuts down. I feel it should be a simple fix but cant find anything to support.

    I have attached an example workbook.
    Attached Files Attached Files
    Last edited by MonTheEck; 03-28-2019 at 10:48 AM.

  2. #2
    Forum Contributor
    Join Date
    08-21-2018
    Location
    Romania
    MS-Off Ver
    2010
    Posts
    178

    Re: If Range ("A1) = "TEXT1" Then Range ("A2) = "TEXT 2"

    write without space
    HTML Code: 

  3. #3
    Registered User
    Join Date
    06-13-2018
    Location
    Glasgow
    MS-Off Ver
    2013
    Posts
    33

    Re: If Range ("A1) = "TEXT1" Then Range ("A2) = "TEXT 2"

    That was a typo, sorry. It still errors.

  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,601

    Re: If Range ("A1) = "TEXT1" Then Range ("A2) = "TEXT 2"

    The code below creates a DV list for B3 that excludes the item in F corresponding the the chosen value in B2:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: If Range ("A1) = "TEXT1" Then Range ("A2) = "TEXT 2"

    Right Click On Your Sheet Name At the Bottom Of Excel and Select View Code
    Paste this code in the module that opens and close it.

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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: 5
    Last Post: 02-05-2019, 12:03 AM
  2. [SOLVED] Column X-Ref list - Sheet1 Col A "pages", Col B:FL "Req" to Sheet2 ColA "req", ColB "page"
    By excel-card-pulled in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-07-2017, 09:30 AM
  3. Replies: 1
    Last Post: 08-15-2014, 06:00 AM
  4. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  5. Replies: 4
    Last Post: 11-17-2013, 12:05 PM
  6. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  7. use variable in Workbooks("book1").Worksheets("sheet1").Range("a1"
    By Luc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-28-2005, 04:05 PM

Tags for this Thread

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