formula sequence

JuniorB

New Member
Joined
Dec 3, 2021
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hello,

I'm looking for the right formula sequence possibly using IF, with VLOOKUP and conditional formatting.

If I have a name in cell A1 with B1 empty (sheet1), where if a date is entered in B1, the name in A1 is searched across sheets 2, 3, 4, and 5 and wherever that name is located, the font would change to red. When the date is deleted beside the name, the sheets would return to the original font colour.

Thanks for any advice or tips, I appreciate it.

Take care,

JuniorB
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Can be done with a formula in conditional formatting. Example below. I think you would need to define the conditional formatting four times, once each for sheets 2-5. In order not to bog down excel, the conditional formatting range should be limited to the data or perhaps a little bigger if you expect the data to grow. Definitely do not apply conditional formatting to the entire sheet. In the example below, the CF is only applied to a 20 cell range on Sheet2. If your date field is text and not a true excel date (which is a number) then change the formula to =(A1=Sheet1!$A$1)*(LEN(Sheet1!$B$1)>0)

Book2
A
1Adam Ant
2Bruce Banner
3Charlie Chaplin
4Delta Dawn
5Emilio Estevez
6Fannie Farmer
7Galileo Galilei
8Harry Houdini
9Igor Ivanov
10Jonah Jameson
11Kris Kristofferson
12Lois Lane
13Mickey Mantle
14Nick Nolte
15Ozzy Osbourne
16Pol Pot
17Quintavius Quire
18Ryan Reynolds
19Sue Storm
20Tina Turner
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:A20Expression=(A1=Sheet1!$A$1)*(Sheet1!$B$1>0)textNO


Book2
AB
1Mickey Mantle12/3/2021
Sheet1
 
Upvote 0
Hi JuniorB,

This is Sheet1
JuniorB.xlsx
ABC
1Harry1/1/2020
2
Sheet1


Here is the Conditional Format for every other sheet

JuniorB.xlsx
ABCDEFG
1
2
3VeraHarry
4
5FredBert
6
7Tom
8
9HarryVanessa
10
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
1:1048576Expression=AND(A1=Sheet1!$A$1,ISNUMBER(Sheet1!$B$1))textNO
 
Upvote 0
Hi - Thanks so much for the help. Both solutions work but I should have expanded my description more, sorry, I went too simple in trying to understand.

If I have a range of names (Sheet1), how can those formulas in Sheet2 work? And what if there's another column of names for Sheet 1 in addition to the A column, how would the formula work? (here's an example)

1638569972439.png


Thanks alot for the support. Really appreciate it.

 

Attachments

  • Capture1.PNG
    Capture1.PNG
    30.5 KB · Views: 3
Upvote 0
Data

JuniorB.xlsx
ABCD
1Adam AntMickey Mantle
2Bruce BannerNick Nolte2/2/2021
3Charlie Chaplin1/1/2021Ozzy Osbourne
4Delta DawnQuintavius Quire
5Emilio EstevezRyan Reynolds3/3/2020
6Fannie FarmerSue Storm
7Galileo GalileiTina Turner
8Harry HoudiniDelta Dawn
9Igor Ivanov
10Jonah Jameson
11Kris Kristofferson
12Lois Lane
13
Sheet3


Sheet with CF

JuniorB.xlsx
ABCDEF
1Harry Houdini
2Charlie ChaplinIgor Ivanov
3
4
5Charles BabbageNick Nolte
6
7Ryan Reynolds
8
9
10
11
12
13
Sheet4
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:H14Expression=OR(IFERROR(VLOOKUP(A1,Sheet3!$A$1:$B$12,2,0),0)>0,IFERROR(VLOOKUP(A1,Sheet3!$C$1:$D$12,2,0),0)>0)textNO
 
Upvote 0
Solution
Another option

JuniorB.xlsm
ABCD
1Adam AntMickey Mantle
2Bruce BannerNick Nolte2/02/2021
3Charlie Chaplin1/01/2021Ozzy Osbourne
4Delta DawnQuintavius Quire
5Emilio EstevezRyan Reynolds3/03/2020
6Fannie FarmerSue Storm
7Galileo GalileiTina Turner
8Harry HoudiniDelta Dawn
9Igor Ivanov
10Jonah Jameson
11Kris Kristofferson
12Lois Lane
13
Sheet1


JuniorB.xlsm
ABCD
1Harry Houdini
2Charlie ChaplinIgor Ivanov
3
4Charlie Chaplin
5Charles BabbageNick Nolte
6
7Ryan Reynolds
8
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:D7Expression=SUMPRODUCT((Sheet1!$A$1:$C$20=A1)*(Sheet1!$B$1:$D$20>0))textNO
 
Upvote 0
Hello,

Thank you to everybody for the help. Really appreciate it and those solutions worked. Take care and have a wonderful holiday season!
 
Upvote 0

Forum statistics

Threads
1,215,012
Messages
6,122,682
Members
449,091
Latest member
peppernaut

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