Need Help conditional formatting or macro across worksheets

bejinsky01

New Member
Joined
Aug 21, 2011
Messages
6
I have a somone complicated situation, wish i could talk to an expert on the phone. So here goes... I have 15 worksheets in one workbook, in column b in any worksheet any given number cannot appear more than 2 times, i have it setup in each worksheet, but i want to be in one worksheet and it search column b in all other worksheets and give a result.

Example:

sheet1 has the number 3 two times in column b, if i got to sheet2 column b and put in the number 3 i want it to turn red.

i want this to work no matter what sheet i'm in.
 
Last edited:

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Sorry, answers by phone is not how the forum works.

I have removed your e-mail address to save you from being spammed. If somebody wants to contact you then they can send you a Personal Message. But the preferred and usual way of answering questions is to post a reply to the thread.
 
Upvote 0
You should be able to use Conditional Formatting, maybe like this

Excel Workbook
B
13
23
3
Sheet1



Excel Workbook
B
11
22
33
44
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B11. / Formula is =COUNTIF(Sheet1!B:B,B1)>=2Abc
 
Upvote 0
i tried that it says cant reference another worksheet for conditional formatting. so i think i need a macro, which i know nothing about, or maybe some sorta trick. thanks
 
Upvote 0
Try creating a named range for your cells in column B of Sheet1 http://www.contextures.com/xlNames01.html

I named B1:B10 as MyRange. Then you can use this in your CF formula

Excel Workbook
B
11
22
33
44
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B11. / Formula is =COUNTIF(MyRange,B1)>=2Abc


P.S. or Excel 2010 allows references to other sheets in CF formulas.
 
Upvote 0
that worked for the most part, now how do i get it to work so that if i'm in sheet1 it will search all 14 other worksheets
 
Upvote 0
You will need VBA to do this.

I have several questions,

1 only colunn nmber 3
any sheet except sheet 1

Any sheet

and so on.
 
Upvote 0
i don't understand your questions so i will give an example the best way i can.

i have 15 worksheets, if i put the number 3 in column b on any sheet more than 2 times i want it to turn the cell solid red.

example: sheet1 & sheet 2 have number 3 in column b so when i go to sheet14 and try to put number 3 in column b that cell should turn red.

example: sheet4 has number 3 in column b two times, so when i go to say sheet7 and try to put number 3 in column b that cell should turn red.

i want this to work no matter what sheet i'm in.
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,253
Members
452,900
Latest member
LisaGo

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