Hi!
I know next to nothing about vb programming, but nevertheless i have tried to compile a function it although contains an error which i can't identify.
Hope someone can and will help... thxPlease Login or Register to view this content.
Hi!
I know next to nothing about vb programming, but nevertheless i have tried to compile a function it although contains an error which i can't identify.
Hope someone can and will help... thxPlease Login or Register to view this content.
Last edited by Slowfish; 04-23-2012 at 09:42 AM.
You have two "for"s and only one "next". You need a next for each for.
Also, you are using "cell" twice, once as part of varRange, and once as part of subRange. You can solve this with cell1 and cell2.Please Login or Register to view this content.
there is only one cell variable that make confusing (a share variable)
May be
Please Login or Register to view this content.
Best regard, -)iger-/iger
If you are pleased with a solution mark your post SOLVED.
Thanks... I still really dont know what to do. I just derived and compiled the function based on what i have seen in other vb functions, but clearly I haven't understood a fraction of what is needed. Can you help me rewrite it? plz...
Thanks tiger, but it still gives me an error in the 4th line closest to the end:
Next If Cell2 .Text = strText Then Countcolorif = Countcolorif + 1
P.S. I'm not for sure what you want, but the syntax here is correct.
Please Login or Register to view this content.
What is Countcolorif?it still gives me an error in the 4th line closest to the end:
Next If Cell2 .Text = strText Then Countcolorif = Countcolorif + 1
Here Countcoloriftext is the function which returns a long variable.Please Login or Register to view this content.
Thanks for input... StevenM yours almost worked.
I have attached an example:
example.xlsm
I need to count the number of active/inactive subscriptions.
Last edited by Slowfish; 04-23-2012 at 10:39 AM.
Well the answers are:
Active & A = 9, because 3 actives * 3 As = 9
Active & B = 6, because 3 actives * 2 Bs = 6
Inactive & A = 6, because 2 inactives * 3 As = 6
Inactive & B = 4, because 2 inactive * 2 Bs = 4
So where is the problem?
Lolz Tigertiger! This is second time today you have made my live simpler Thanks a lot...
How about?
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks