![]() |
|
||||||||
| Site Links |
| Consulting |
| Knowledge Base |
| Training |
| Forum |
| Articles |
| Resources |
| Products |
| Cool Tools |
| Contact |
| About Us |
| Go to Page... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
|
Solved: VBA code to count blank cells in a dynamic range
Hi Everyone ,
I need to edit below script to count blank cells in dynamic range in column F only in Year6. F9 should display the result. At the moment Countblank formula calculates that but when data range changes it doesn't give the right value. I think OFFSET function would work in this case however I was wondering if there is a way to get it done by VBA script? ![]() sample files are attached. Your help is appreciated. VBA:
VBA tags courtesy of www.thecodenet.com
....have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.SJ |
|
Local Time: 12:11 PM
Local Date: 05-22-2013 Location:
|
|
|
|
#2 |
|
|
Hi Yeliz T,
You can use this, though bear in mind that the second time you run it the result will be one less as the code has put the result in cell F9 hence reducing the number of blank cells by at least one: VBA:
VBA tags courtesy of www.thecodenet.com
HTH Robert Last edited by Aussiebear : 04-30-2012 at 11:45 PM. Reason: Corrected the tags surrounding the code |
|
Local Time: 09:11 PM
Local Date: 05-22-2013 Location:
|
|
|
|
#3 |
|
|
Hi Robert ,
Sorry for replying late. I used the script you gave me and it's working great. However it didn't reduce number of blank cells even I ran it more than twice.. Anyway this is what I was looking for. Thank you so much for your help. Much appreciated.. Cheers Yeliz ....have the courage to follow your heart and intuition. They somehow already know what you truly want to become. Everything else is secondary.SJ |
|
Local Time: 12:11 PM
Local Date: 05-22-2013 Location:
|
|
![]() |
| Display Modes |
Linear Mode |
Switch to Hybrid Mode |
Switch to Threaded Mode |
|
|


