08-23-2006, 10:07 PM
I have just begun experimenting with macros and have been finding it useful. I just discovered a way to run a macro to identify particular values/text through out a worksheet and highlight the cell that it is in.
For Each c In Worksheets("Sheet1").Range("A1:K10000")
If c.Value = "39015" Then
c.Interior.ColorIndex = 6
End If
Next c
Here is what I need help with. I need to know how to have macros scan the worksheet for a particular item description and input a value in the cell directly to the right of it. The value could appear in any cell in various locations so I cannot refer to a specific cell.
Here is an example:
I would like to locate value/text "3060 SH GRID"
......(happens to end up in B7)
then Input "100" in Cell C7
please help
For Each c In Worksheets("Sheet1").Range("A1:K10000")
If c.Value = "39015" Then
c.Interior.ColorIndex = 6
End If
Next c
Here is what I need help with. I need to know how to have macros scan the worksheet for a particular item description and input a value in the cell directly to the right of it. The value could appear in any cell in various locations so I cannot refer to a specific cell.
Here is an example:
I would like to locate value/text "3060 SH GRID"
......(happens to end up in B7)
then Input "100" in Cell C7
please help