Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi All.........
I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub FindVendorNumber()
Dim oCell As Range Dim val val = InputBox("Please supply number") If val < "" Then Set oCell = Columns("A:A").Find(What:=val, _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not oCell Is Nothing Then With oCell.EntireRow.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With oCell.Select End If End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "CLR" wrote in message ... Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks Bob, but I get a "1004" error "Unable to get the Find Property of
the Range Calss".... on the "Set oCell" line.....I forgot to mention I'm using XL97, could that be the problem? Vaya con Dios, Chuck, CABGx3 "Bob Phillips" wrote: Sub FindVendorNumber() Dim oCell As Range Dim val val = InputBox("Please supply number") If val < "" Then Set oCell = Columns("A:A").Find(What:=val, _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not oCell Is Nothing Then With oCell.EntireRow.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With oCell.Select End If End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "CLR" wrote in message ... Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found it!................just needed to add a line,
Sheets("DETAIL").Select......dunno why, but it works fine with that. Life if good now, and I thank you very very much, kind Sir. Vaya con Dios, Chuck, CABGx3 "Bob Phillips" wrote: Sub FindVendorNumber() Dim oCell As Range Dim val val = InputBox("Please supply number") If val < "" Then Set oCell = Columns("A:A").Find(What:=val, _ After:=ActiveCell, _ LookIn:=xlFormulas, _ LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, _ MatchCase:=False) If Not oCell Is Nothing Then With oCell.EntireRow.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With oCell.Select End If End If End Sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "CLR" wrote in message ... Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "CLR" wrote: Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to find numbers in a column with a macro box
"CLR" wrote: Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "CLR" wrote: Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I can't tell if this thread has been answered or not. The quick answer is
to assign the results of the search to a range object Dim c as range c=Selection.Find 'and so forth then you can get the row from c: myRow=c.Row James "Donald E" wrote in message ... "CLR" wrote: Hi All......... I am in need of a macro beyond my skill level, if someone please. I want to do a FIND on column A and have a pop-up ask the user for a number to find, then find it and color the whole row gold, then goto column A of that row..........my efforts at recording brings in specific cell locations which will not work for multiple searches. Here's my recorded macro....... Sub FindVendorNumber() Columns("A:A").Select Selection.Find(What:="a01309", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False).Activate Rows("781:781").Select With Selection.Interior .ColorIndex = 40 .Pattern = xlSolid .PatternColorIndex = xlAutomatic End With Range("A781").Select End Sub Any help would be much appreciated......... Vaya con Dios, Chuck, CABGx3 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Where (menu) find "fill color" and define/add a new color? | Excel Discussion (Misc queries) | |||
Find a color value | Excel Worksheet Functions | |||
Make text color match cell color with macro? | Excel Discussion (Misc queries) | |||
macro -find all occurences of a word-change color of cell of all | Excel Programming | |||
Find color in row | Excel Programming |