Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Okay.
c, rbn, rbo and rnbo are ranges. DupsFound is boolean. The logic is if this cell is this workbook on this sheet in this range (see ranges above) equals the value of this cell in this workbook on this sheet in this range (again see above) then set the boolean to true and color the cell red. Any ideas why the entire column turns red? First, here is an example of my declared ranges: temp1 = InputBox("What is the name of the new Demand Workbook?") Set BANew = Workbooks(temp1 & ".xls").Sheets(1) t1 = BANew.Cells(Rows.Count, 1).End(xlUp).Row Set rbn = BANew.Range(BANew.Cells(3, 1), BANew.Cells(t1, 1).End(xlDown)) Then here is where I check for duplicates between workbook and different worksheets within those workbook: For Each c In rbn.Cells If Application.CountIf(rbo, c.Value) 0 Then _ DupsFound = True c.Interior.ColorIndex = 3 If Application.CountIf(rnbo, c.Value) 0 Then _ DupsFound = True c.Interior.ColorIndex = 3 Next If you need clarification just let me know: Nicole |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
convert Boolean true-false to zero's and ones | Excel Discussion (Misc queries) | |||
TRUE - Boolean vs. Text | Excel Worksheet Functions | |||
Boolean 0/1 instead of True/False | Excel Discussion (Misc queries) | |||
how can I insert a macro into a boolean statement | Excel Worksheet Functions | |||
using macro IE turns error... | Excel Programming |