ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Input 'MATCH' If Match (https://www.excelbanter.com/excel-discussion-misc-queries/208646-input-match-if-match.html)

Cue

Input 'MATCH' If Match
 
Greetings,

The following code colors the row the matches the criteria. But I would like
the code to insert the word 'MATCH' in column 'Z' to each row that matches
the criteria. I am assuming the line with the stars is the only line I have
to change. But I have tried numerous ways but was unsuccessful. Can someone
show me what it should be?

Dim myCell As Range
Dim myrng As Range
Set myrng = Sheets("C&D").Range("$B$1:$B$50")

For Each myCell In myrng.Cells
whatwant = myCell.Value


For Each rCell In Sheets("MultAdjDaily").Range("$C$6:$C$1200")
If rCell.Value Like whatwant And rCell.Value 0 Then

*****rCell.EntireRow.Resize(1, 14).Interior.ColorIndex = 43*****

End If
Next cell
Next micelle

Thanks for your time...
--
Cue

Gary''s Student

Input 'MATCH' If Match
 
Cells(rcell.Row, "Z").Value = ("MATCH")
--
Gary''s Student - gsnu200811

Cue

Input 'MATCH' If Match
 
Gracias Gary. Muchas gracias!
--
Cue


"Gary''s Student" wrote:

Cells(rcell.Row, "Z").Value = ("MATCH")
--
Gary''s Student - gsnu200811


Gary''s Student

Input 'MATCH' If Match
 
Glad to help!
--
Gary''s Student - gsnu200811


"Cue" wrote:

Gracias Gary. Muchas gracias!
--
Cue


"Gary''s Student" wrote:

Cells(rcell.Row, "Z").Value = ("MATCH")
--
Gary''s Student - gsnu200811



All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com