Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9031947
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:51:31+00:00 2026-06-16T07:51:31+00:00

I wonder whether someone may be able to help me please. I’m using the

  • 0

I wonder whether someone may be able to help me please.

I’m using the code below, which among a number of actions being performed, automatically populates column “A” with the date, and column “AS” with the text value “No” when a new record is created within a Excel spreadsheet.

Option Explicit
Public preValue As Variant
Private Sub Worksheet_Change(ByVal Target As Range)

    Dim Cell As Range, res As Variant
    Dim rCell As Range
    Dim Rng1 As Range
    Dim Rng2 As Range
    Dim Rng3 As Range


    Application.EnableCancelKey = xlDisabled
    'Sheets("Input").Protect "handsoff", UserInterFaceOnly:=True, AllowFiltering:=True, AllowFormattingColumns:=True

    If Target.Column = 3 Then
        If Target = "No" Then MsgBox "Please remember to make the same change to all rows for " & Target.Offset(0, -1).Value & " and delete any future forecasts"
    End If

       If Target.Cells.Count > 1 Then Exit Sub
    On Error Resume Next

    If Not Intersect(Target, Range("B5:AD400", "AF5:AQ400")) Is Nothing Then
        If Target.Value <> preValue And Target.Value <> "" Then
            Application.EnableEvents = False
           With Rows(Target.Row)
                    .Range("A1").Value = Date
                    .Range("AS1").Value = "No"
        End With
            Application.EnableEvents = True
            Target.Interior.ColorIndex = 35
        End If
    End If

    On Error GoTo 0
    If Target.Column = 45 Then
                If Target.Value = "Yes" Then
                Set Rng1 = Application.Union(Cells(Target.Row, "B").Resize(, 19), Cells(Target.Row, "R"))
                Rng1.Interior.ColorIndex = xlNone
                Set Rng2 = Application.Union(Cells(Target.Row, "S").Resize(, 12), Cells(Target.Row, "AD"))
                Rng2.Interior.ColorIndex = 37
                Set Rng3 = Application.Union(Cells(Target.Row, "AF").Resize(, 12), Cells(Target.Row, "AQ"))
                Rng3.Interior.ColorIndex = 42
                End If
    End If

    If Not Intersect(Target, Range("J7:J400")) Is Nothing Then
        Set Cell = Worksheets("Lists").Range("B2:C23")
        res = Application.VLookup(Target, Cell, 2, False)
    If IsError(res) Then
        Range("K" & Target.Row).Value = ""
    Else
        Range("K" & Target.Row).Value = res
    End If
    End If

End Sub

What I’d like to do, if at all possible, is when the date is inserted into column “A”, I’d like to insert the text value “Select” on the same row in column “C”. This value is taken from the first value I have in a drop down menu, set up on a sheet called “Lists” with the named range “RDStaff”.

Could someone perhaps tell me please how I may go about changing the functionality, so that as soon as column “A” is populated with the date, the first value from my list i.e. “Select” is automatically populated in column “C”?

Many thanks and kind regards

Chris

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T07:51:33+00:00Added an answer on June 16, 2026 at 7:51 am

    It is not clear exactly which cell in column C is where your validation list is being used from, but if you add the code below into your with statement it should work, of course, adjusting to the appropriate drop-down cell.

    .Range("C1").Value = Sheets(1).Range("C10").Value

    Now, this assumes your drop down list, based on your validation is in the first sheet of your workbook (by index) in cell C10. You’ll need to adjust these to match your data / workbook structure.

    The point is that you don’t hard code the value. You reference the value from the drop-down list location.

    Per your comments, here is a code snippet to add the validation list into your code.

    With Rows(Target.Row)
    
        '... your existing code
        With Range("C1").Validation
          .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween,  Formula1:=Lists!RDStaff ' you may need to make this named range global for it to work on another sheet in this context
          .IgnoreBlank = True
          .InCellDropdown = True
        End With
    
    End WIth
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wonder whether someone may be able to help me please. The code below
I wonder whether someone may be able to help me please. The code below
I wonder whether someone may be able to help me please. I'm using the
I wonder whether someone may be able to help me please. I'm using Aurigma
I wonder whether someone may be able to help me please. I'm using the
I wonder whether someone may be able to help me please. I'm using this
I wonder whether someone can help me please. I'm using the code below to
I wonder whether someone may be able to help me please. I am using
I wonder whether someone may be able to help me please. I'm using the
I wonder whether someone may be able to help me please. I'm using the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.