Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Macro Needed

  1. #1
    New Member
    Join Date
    Jan 2002
    Post Thanks / Like
    0 Post(s)
    0 Thread(s)


    Two sheet workbook. Sheet A is a form that fills in customer information based on a drop down box that they select from (cell J4). The drop down box is just a customer number and depending on what they select it fills in the detail - customer name, etc. The user has one blank field in the form to fill in. It's a date (cell c14).

    I want a macro that will look at the drop down box (sheetA!J4) to see what they selected and then go to Sheet B and find that customer number (number is listed in column B [a whole bunch of them]) and then place the date in column C next to the right customer number.

    I want a macro to do this since I have a macro that prints out an agreement based on the customer and would like to combine it with my other so that the user has it easy.

    Can someone help? I have gotten a kick out of VBA and am very green but have had fun learning some of it. I plan to purchase a book this weekend to help with the rest of the project. Thanks!

  2. #2
    Board Regular
    Join Date
    Aug 2003
    Post Thanks / Like
    3 Post(s)
    1 Thread(s)

    Default Re: Macro Needed


    I know you posted this a long time ago, but I have only recently registered, and am trying to work my way through the unanswered posts, to gain as much experience as possible. I don't know if you need this any more, but I think I have come up with a solution.

    Add the following code and assign the macro to the drop down box.

    Option Explicit
    Dim CUST_NO As Single

    Sub Macro1()
    CUST_NO = ActiveCell

    Sheets("Sheet B").Select
    Cells.Find(What:=CUST_NO, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
    xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
    ActiveCell.Offset(0, 1).Select

    ActiveCell.FormulaR1C1 = "=TODAY()"
    Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
    False, Transpose:=False
    Application.CutCopyMode = False
    End Sub

    Hope this helps.
    Hope this is helpful.

    Have been away from the forum for quite a while, but am now back.

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts