+ Reply to Thread
Results 1 to 3 of 3

3 different things to happen in column A depending on the cell value

  1. #1
    Forum Contributor
    Join Date
    10-25-2016
    Location
    Derby, England
    MS-Off Ver
    MS 2013
    Posts
    228

    3 different things to happen in column A depending on the cell value

    Hi,

    Please can someone help me?

    I would like a vba code to do the following 3 requests please.

    If column A is blank then nothing to happen.

    If there is less than 8 characters in column A then I would like the VBA to find the last entry in column A and then highlight the cell in red and then a message box to say "Process Order number requires a min of 8 characters". Once the message box is okeyed then the cell to be cleared of the characters and colour.

    If column A has 8 or more characters then it continues with the rest of my code.

    Hope this makes sense.

    Thanks
    Dan

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: 3 different things to happen in column A depending on the cell value

    No code required if you used data validation.
    Select Column A and goto Data Validation=>custom=> in the formula box enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    If you really wanted a code then you can use the worksheet change event, in the worksheet module.


    Please Login or Register  to view this content.
    Last edited by davesexcel; 02-07-2018 at 12:07 PM.

  3. #3
    Forum Contributor
    Join Date
    10-25-2016
    Location
    Derby, England
    MS-Off Ver
    MS 2013
    Posts
    228

    Re: 3 different things to happen in column A depending on the cell value

    Hi davesexcel,

    thank you for both options. I didn't think about data validation so I'll have a play and see which one I prefer.

    Thanks again

    Dan

+ 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] Results of cell depending on column
    By Toxicca in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2015, 06:03 AM
  2. Replies: 6
    Last Post: 05-16-2014, 03:03 PM
  3. [SOLVED] Event Change question--trying to make two things happen in the same sheet.
    By Jaron_t in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-07-2012, 04:41 PM
  4. Macro that is column specific & changes cell color depending on cell contents
    By zurispowell in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-25-2012, 05:03 PM
  5. Correct syntax in If Then statement to make 2 things happen if condition met
    By coasterman in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-19-2011, 12:55 PM
  6. I can't make what I want to happen, happen.
    By Thanos in forum Excel General
    Replies: 6
    Last Post: 01-16-2007, 01:29 PM
  7. Replies: 2
    Last Post: 05-02-2005, 02:08 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