Using VBA I want to find how many times an occurance of a text string happens.
ie. how many "HPPL" are within B4:G13, it would be nice too if case didn't matter, I may have to test for both though.
Is there a countif in VBA?
Ron
Using VBA I want to find how many times an occurance of a text string happens.
ie. how many "HPPL" are within B4:G13, it would be nice too if case didn't matter, I may have to test for both though.
Is there a countif in VBA?
Ron
Hello Ron,
You can envoke most of Excel's worksheet functions trough Excel. CountIf is one of them.
Sincerely,![]()
Dim Cnt As Long Dim Rng As Range Set Rng = Worksheets("Sheet1").Range("B4:G13") Cnt = Application.WorksheetFunction.CountIf(Rng, "HPPL")
Leith Ross
Thank you very much, I have finished my sheet!!!
One more thing I woudn't mind adding as a nice touch, is there a way to find out if the worksheet has been printed?
Ron
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks