Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Need Find and color row macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Need Find and color row macro

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   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Need Find and color row macro

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   Report Post  
Posted to microsoft.public.excel.programming
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Need Find and color row macro

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Find and color row macro



"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Need to find numbers

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Need Find number in B row with 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


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Need Find number in B row with macro Box

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where (menu) find "fill color" and define/add a new color? Claudia d'Amato Excel Discussion (Misc queries) 1 November 16th 08 11:21 AM
Find a color value Scott Excel Worksheet Functions 5 July 10th 08 11:59 AM
Make text color match cell color with macro? JoeSpareBedroom Excel Discussion (Misc queries) 1 June 26th 07 07:09 PM
macro -find all occurences of a word-change color of cell of all Lost in Alabama Excel Programming 2 January 17th 06 01:46 PM
Find color in row evgny Excel Programming 2 October 4th 05 01:56 PM


All times are GMT +1. The time now is 07:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"