+ Reply to Thread
Results 1 to 5 of 5

Macro Help:employee number

Hybrid View

  1. #1
    DNA
    Guest

    Macro Help:employee number

    I'm sure this will be a Macro:

    I have several sheets with a workbook that contain part numbers. If a
    part number = X, then place an employee number in the next column directly
    beside the part number column.

    NOTE: Part numbers vary from column to column throughout the work book.

    Thanks for your help!!


  2. #2
    Don Guillett
    Guest

    re: Macro Help:employee number

    Have a look in VBA help index for FINDNEXT. There is a good example you can
    modify.

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "DNA" <dnoel@fsgbank.com> wrote in message
    news:54a55c91224f8f183cb297aa2bef0723@localhost.talkaboutsoftware.com...
    > I'm sure this will be a Macro:
    >
    > I have several sheets with a workbook that contain part numbers. If a
    > part number = X, then place an employee number in the next column directly
    > beside the part number column.
    >
    > NOTE: Part numbers vary from column to column throughout the work book.
    >
    > Thanks for your help!!
    >




  3. #3
    DNA
    Guest

    re: Macro Help:employee number

    It doesn't appear that FINDNEXT would be the choice I should use.

    I want one macro that searches all worksheets, and if it finds a part
    number of 54789, then put employee number 005 in the column directly
    beside the part number. This way when one value is entered, it populates
    the entire workbook.

    Hope this makes sense.


  4. #4
    Don Guillett
    Guest

    re: Macro Help:employee number

    Still not clear what you want. If desired you may send to the address BELOW
    a SMALL workbook example and I will take a look. With that make a CLEAR
    explanation of what you want as I will not go back to this thread to look at
    the problem.

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "DNA" <dnoel@fsgbank.com> wrote in message
    news:1b55851419f509bf83c30456876ed37f@localhost.talkaboutsoftware.com...
    > It doesn't appear that FINDNEXT would be the choice I should use.
    >
    > I want one macro that searches all worksheets, and if it finds a part
    > number of 54789, then put employee number 005 in the column directly
    > beside the part number. This way when one value is entered, it populates
    > the entire workbook.
    >
    > Hope this makes sense.
    >




  5. #5
    Don Guillett
    Guest

    re: Macro Help:employee number

    Why not? Modified from Help. I added the for each sh loop

    Sub findnumbersinallworksheets()
    For Each sh In Worksheets
    With sh.Cells
    Set c = .Find(54789, LookIn:=xlValues)
    If Not c Is Nothing Then
    firstAddress = c.Address
    Do

    c.Offset(, 1) = "005"
    c.Offset(, 1).NumberFormat = "000"

    Set c = .FindNext(c)
    Loop While Not c Is Nothing And c.Address <> firstAddress
    End If
    End With
    Next sh
    End Sub

    --
    Don Guillett
    SalesAid Software
    donaldb@281.com
    "DNA" <dnoel@fsgbank.com> wrote in message
    news:1b55851419f509bf83c30456876ed37f@localhost.talkaboutsoftware.com...
    > It doesn't appear that FINDNEXT would be the choice I should use.
    >
    > I want one macro that searches all worksheets, and if it finds a part
    > number of 54789, then put employee number 005 in the column directly
    > beside the part number. This way when one value is entered, it populates
    > the entire workbook.
    >
    > Hope this makes sense.
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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