Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Help
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Help
Have a look in VBA help index for FINDNEXT. There is a good example you can
modify. -- Don Guillett SalesAid Software "DNA" wrote in message lkaboutsoftware.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
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Help
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Help
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 "DNA" wrote in message lkaboutsoftware.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
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro Help
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 "DNA" wrote in message lkaboutsoftware.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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can T Get Macro To Run! | New Users to Excel | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Help with macro looping and color query function | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) | |||
Date macro | Excel Discussion (Misc queries) |