+ Reply to Thread
Results 1 to 4 of 4

Force data entry into a cell depending on value of a different cell

  1. #1
    Registered User
    Join Date
    06-16-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Force data entry into a cell depending on value of a different cell

    Hi All,

    i have a spreadsheet showing materials arriving for delivery into a warehouse and I need to force the kilos being delivered to be entered when the pallets column has a number greater than zero entered.

    Pallets in column K rows 2 - 32 and column S rows 2 - 32
    I need to force people to enter data into column L if data is entered in column K and column T if data is entered in column S

    I copied the below but I can only get it to work for columns K/L - need to know how / if I can amend this to run for the second set of columns too

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim myC As Range
    For Each myC In Range("K2:K32")
    If myC.Value <> "" And myC(1, 2).Value = "" Then
    Application.EnableEvents = False
    myC(1, 2).Select
    MsgBox "Enter a value into cell " & myC(1, 2).Address & ", please"
    Application.EnableEvents = True
    End If
    Next myC
    End Sub

    Thanks in advance

  2. #2
    Registered User
    Join Date
    06-12-2015
    Location
    Maryland, USA
    MS-Off Ver
    2010
    Posts
    83

    Re: Force data entry into a cell depending on value of a different cell

    if you got it working for K/L why not just repeat the iteration? Try this:

    Please Login or Register  to view this content.
    or I might be missing something in your problem
    Last edited by JoeFoot; 06-16-2015 at 11:41 AM.
    Got help? Pls give rep.
    If you do R&D learn VBA

  3. #3
    Registered User
    Join Date
    06-16-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    6

    Re: Force data entry into a cell depending on value of a different cell

    Thanks very much, you got it spot on and it now works perfectly...very much appreciated.

  4. #4
    Registered User
    Join Date
    06-12-2015
    Location
    Maryland, USA
    MS-Off Ver
    2010
    Posts
    83

    Re: Force data entry into a cell depending on value of a different cell

    Glad to help.

    Best of luck.

+ 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. force a cell entry
    By jigle009 in forum Excel General
    Replies: 2
    Last Post: 04-25-2014, 05:26 PM
  2. [SOLVED] Force data entry in cell with drop down list (i.e. Prevent user from leaving cell blank)
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-15-2014, 05:28 AM
  3. [SOLVED] Excel VBA to force cell entry if another cell is not empty
    By cedric_dranreb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-11-2013, 02:53 AM
  4. code to force cell entry
    By 3earth in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-28-2013, 02:15 AM
  5. Replies: 8
    Last Post: 06-24-2012, 07:38 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