ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Newb needs help....PLEASE!!! (https://www.excelbanter.com/excel-programming/421351-newb-needs-help-please.html)

SarahJ

Newb needs help....PLEASE!!!
 
I need some help.....The following is the senario I need to accomplish with a
macro of some sort but am lost on how to do it.

I have two worksheets
"Sheet1" and
"Sheet2" (for simplicity)

I want to compare column "I" (it will always be column "I") of both
worksheets (column I contains user ID's). If a user Id appears on "Sheet2"
and not "Sheet1" I want it to get highlighted.

Any ideas on how to get this accomplished would be greatly appreciated.



Rick Rothstein

Newb needs help....PLEASE!!!
 
Go to Sheet1, highlight your list of names (you can select more cells if you
think additional names will be added in the future), then put your cursor in
the Name Box (the empty field to the left of the Formula Bar) and type in a
name for the selected cells, say SheetOneList for this example. Next, go to
Sheet2, and select all of Column I, then click Format/Conditional Formatting
on the menu bar. When the dialog box appears, select "Formula Is" from the
drop down and copy/paste this formula in the empty field next to the drop
down...

=AND(I1<"",ISERROR(MATCH(I1,SheetOneList,0)))

Then click the Format button, select the Patterns tab and choose a color you
want the cells containing missing names to be tinted in. Finally, OK your
way back to the worksheet. Now when you type in names in Column I on Sheet2
that do not appear in the list on Sheet1, those names will be highlighted.

--
Rick (MVP - Excel)


"SarahJ" wrote in message
...
I need some help.....The following is the senario I need to accomplish with
a
macro of some sort but am lost on how to do it.

I have two worksheets
"Sheet1" and
"Sheet2" (for simplicity)

I want to compare column "I" (it will always be column "I") of both
worksheets (column I contains user ID's). If a user Id appears on
"Sheet2"
and not "Sheet1" I want it to get highlighted.

Any ideas on how to get this accomplished would be greatly appreciated.




SarahJ

Newb needs help....PLEASE!!!
 
Thank you very much.....that did exactly what I wanted!!!!!!!!! :) and it
was EASY!!!!!!!!!

"Rick Rothstein" wrote:

Go to Sheet1, highlight your list of names (you can select more cells if you
think additional names will be added in the future), then put your cursor in
the Name Box (the empty field to the left of the Formula Bar) and type in a
name for the selected cells, say SheetOneList for this example. Next, go to
Sheet2, and select all of Column I, then click Format/Conditional Formatting
on the menu bar. When the dialog box appears, select "Formula Is" from the
drop down and copy/paste this formula in the empty field next to the drop
down...

=AND(I1<"",ISERROR(MATCH(I1,SheetOneList,0)))

Then click the Format button, select the Patterns tab and choose a color you
want the cells containing missing names to be tinted in. Finally, OK your
way back to the worksheet. Now when you type in names in Column I on Sheet2
that do not appear in the list on Sheet1, those names will be highlighted.

--
Rick (MVP - Excel)


"SarahJ" wrote in message
...
I need some help.....The following is the senario I need to accomplish with
a
macro of some sort but am lost on how to do it.

I have two worksheets
"Sheet1" and
"Sheet2" (for simplicity)

I want to compare column "I" (it will always be column "I") of both
worksheets (column I contains user ID's). If a user Id appears on
"Sheet2"
and not "Sheet1" I want it to get highlighted.

Any ideas on how to get this accomplished would be greatly appreciated.





Don Guillett

Newb needs help....PLEASE!!!
 
Sub highlitenonmatch()
On Error Resume Next
mySource = Sheets("sheet1").Columns("i")
mc = "I"
For i = 1 To Cells(Rows.Count, mc).End(xlUp).Row
Cells(i, mc).Interior.ColorIndex = 0
If Application.Match(Cells(i, mc), mySource, 0) < 0 Then
Cells(i, mc).Interior.ColorIndex = 6
End If
Next i
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"SarahJ" wrote in message
...
I need some help.....The following is the senario I need to accomplish with
a
macro of some sort but am lost on how to do it.

I have two worksheets
"Sheet1" and
"Sheet2" (for simplicity)

I want to compare column "I" (it will always be column "I") of both
worksheets (column I contains user ID's). If a user Id appears on
"Sheet2"
and not "Sheet1" I want it to get highlighted.

Any ideas on how to get this accomplished would be greatly appreciated.





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

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