Hello,
I have a macro that chooses dates from a field which is a general download from our information system. It then sorts the dates Ascending, and puts in a True False formula to see if any of the dates are repeated. It then copy pastes values the TRUE and falses so that when you sort, the formula does not relaclulate. It then sorts by TRUE / FALSE to get a resulting list of which dates are not repeated: represented by the FALSEs.
Resulting Table may look something like this:
23/02/2009 FALSE
24/02/2009 FALSE
25/02/2009 FALSE
26/02/2009 FALSE
27/02/2009 FALSE
28/02/2009 FALSE
01/03/2009 FALSE
23/02/2009 TRUE <--(First date that repeats)
23/02/2009 TRUE
23/02/2009 TRUE
23/02/2009 TRUE
23/02/2009 TRUE
I want to then add into the macro code to select the range of only the dates which do not repeat, the FALSE dates. I dont think any of the .SpecialCells methods will work, since I've tried many of them. Any help would be grand.
Configuration: Windows XP Internet Explorer 6.0
This code will put a thin style border around the date, Column A and "FALSE", Column B.
|
Say that the column containing "True" or "False" is column B. You could create another adjacent column C with the following formula, say for row 1, =If(B1="False",1/0,1). Then fill this formula down. While the cells in Column C are highlighted, hit Edit > Goto > Special Cells > Errors. Then you can use the reference: Selection.Offset(0,-1).Select, and voila you have selected the cells that contain the word "False". |