Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have three columns, A, B, C. In columns A & B are dates. Data starts on
row 2, headers are in row 1. In column C I have a formula that says, =IF(COUNTIF($A$2:$A$16,B2)0,B2,"") This formula returns all the dates in my range that match. The problem is that the formula looks row by row and if a date in column B does not match a date in column A, it leaves a blank in the corresponding row of column C. I want to write a macro that deletes all blanks in column C, but column C is never "truly" empty because there is the formula in it. Can I delete my blank rows based on the blanks in column C with the formula existing? Can I use VB to do the work that my formula is doing? If so, how? Furthermore, if the date shows up more than once in column B, it still matches it to the first finding in Column A and I end up with two of the same dates in column C. Ex: 08-oct-04 How can I avoid this? Here's an example of my columns: Column A | Column B | Column C | 06-oct-04 12-oct-04 12-oct-04 07-oct-04 08-oct-04 08-oct-04 08-oct-04 03-oct-04 09-oct-04 04-oct-04 10-oct-04 05-oct-04 11-oct-04 06-oct-04 06-oct-04 12-oct-04 07-oct-04 07-oct-04 13-oct-04 08-oct-04 08-oct-04 I realize that if I delete rows 3, 4 & 5 (in this example) that I will lose the data in columns A & B. That's okay. All I really care about is column C. I hope this is clear and not confusing. Thanks for any help. Sharon |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Running two formulas as one | Excel Worksheet Functions | |||
Running all data through a set of formulas | Excel Discussion (Misc queries) | |||
How can I save the formulas when running a macro? Need ASAP!! | Excel Discussion (Misc queries) | |||
Running a macro if any data is entered in a range of cells | Excel Worksheet Functions | |||
How to skip empty cells while running a macro? | Excel Programming |