LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 183
Default Running macro on cells that contain formulas

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running two formulas as one Steved Excel Worksheet Functions 0 July 15th 09 03:39 AM
Running all data through a set of formulas -Bryan Excel Discussion (Misc queries) 6 April 30th 08 07:20 PM
How can I save the formulas when running a macro? Need ASAP!! MLP Excel Discussion (Misc queries) 2 November 14th 06 07:50 PM
Running a macro if any data is entered in a range of cells Jonathan Excel Worksheet Functions 3 November 16th 05 08:38 PM
How to skip empty cells while running a macro? saziz[_2_] Excel Programming 5 June 10th 04 11:16 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"