Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count macro
I have 2 columns of data (A3:A100 and H3:H100) and wish to count the number
of non-blank cells in each range, then compare the totals. If the totals are equal then the tab for the worksheet will change colour, say red. I have not really used the count function before and all attempts so far have failed. Anyones help would be greatly appreciated. Many Thanks |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count macro
Try the below macro which works on the activesheet
Sub CountBlanksColorTab() If WorksheetFunction.CountBlank(Range("A3:A100")) = _ WorksheetFunction.CountBlank(Range("H3:H100")) Then ActiveSheet.Tab.ColorIndex = 3 Else ActiveSheet.Tab.ColorIndex = -4142 End If End Sub If this post helps click Yes --------------- Jacob Skaria "nbhp" wrote: I have 2 columns of data (A3:A100 and H3:H100) and wish to count the number of non-blank cells in each range, then compare the totals. If the totals are equal then the tab for the worksheet will change colour, say red. I have not really used the count function before and all attempts so far have failed. Anyones help would be greatly appreciated. Many Thanks |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Count macro
If Application.Counta(Range("A3:A100")) =
Application.Counta(Range("H3:H100")) Then Activesheet.Tab.Colorindex = 3 End If -- __________________________________ HTH Bob "nbhp" wrote in message ... I have 2 columns of data (A3:A100 and H3:H100) and wish to count the number of non-blank cells in each range, then compare the totals. If the totals are equal then the tab for the worksheet will change colour, say red. I have not really used the count function before and all attempts so far have failed. Anyones help would be greatly appreciated. Many Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Lookup Count | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
Macro with count if | Excel Discussion (Misc queries) | |||
Why is my macro changing sum to count? | Excel Discussion (Misc queries) |