Find a cell and highlight

jdgamet

New Member
Joined
May 8, 2018
Messages
3
Hello All, I need to create a macro that takes three parameters (tab name, Row# and Col#) i have them in three different columns. Then based on those three parameters find the correct cell and highlights it in yellow...Anyone has an idea how to simply do this?...

Thank you very much,
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi & welcome to MrExcel.
maybe something like
Code:
Sub Hilitecell()
   Dim Cl As Range
   For Each Cl In Range("A2", Range("A" & Rows.Count).End(xlUp))
      Sheets(Cl.Value).Cells(Cl.Offset(, 1).Value, Cl.Offset(, 2).Value).Interior.Color = vbYellow
   Next Cl
End Sub
 
Upvote 0
Thank you Fluff...how do you find a value of one cell in one tab in another tab?....

What do you mean by find?
You want to display the value in a Message box or do something else when you find the value

And you said:
fi
nd a value of one cell in one tab in another tab

in what cell in what tabs
 
Last edited:
Upvote 0
I mean in one tab i have 5 columns: one column has a list of school names...the other 4 columns have dates: fcst, actual, preliminary, etc. The scound tab has 7 columns: one column has school names, the other columns also have dates. i need to find each school name in first tab in the second tab...when i find a match that row will be used to compare the dates on both tabs....
 
Upvote 0
When wanting help here we always need specific details to sort out a script for you.
See here you sad:
I mean in one tab i have 5 columns
We need to know the name of the sheet and we to know what columns.
Is it column 1 to 5?

See here you sad:
one column has a list of school names...the other 4 columns have dates
Which one has the school names?

Then you said:
i need to find each school name in first tab in the second tab
What is the name of the second sheet and in what column do we look

And you then said:
when i find a match that row will be used to compare the dates on both tabs....

Compare the dates and do what.
 
Upvote 0

Forum statistics

Threads
1,223,977
Messages
6,175,753
Members
452,667
Latest member
vanessavalentino83

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top