Thanks Mumps!
It works!
Thanks Mumps!
It works!
Hi Mumps,
I already deleted the blank line between Nike and New Balance however the error still occurs, please see attached file, thanks!
Hi Mumps,
Thank you for spending time for work out the solutions for me!
I have play around the file and it works perfectly but if i deleted one entry says "Nike" at B3 and then there will be an error (please see attached), sorry i didn't make it clear at the beginning, the report is system generated that could be more or less entry on each cell, could you please modify the code?
And may i know what the below code means? is it reflected to the number of option button i have? if i have 10 option button, do i just change to 1 to 10 ?
Many thanks in advance!
I have requested MrExcel to remove my thread due to cross posting, and i don't know why i can't edit above question so that i updated in here!
Thanks Mumps!
I have attached the file.
Basically my vba code is counting the total specific product in column B, for example:
(1) Run VBA Code
(2) Click on Option button to select Adidas
(3) Click on Count Button
(4) Result will show 3 which is because 3 is just a total of "Adidas word" in column B
What i wants the code can help me:
- Counting the total number of Adidas we sold in column B which is 6
- How to write the code for searching specific product by selecting on different option button, for example if i select Nike then click on count, and the result will show me 6
Please see attached excel, thanks in advance for your help!
Thanks Mumps!
I have attached the file.
Basically my vba code is counting the total specific product in column B, for example:
(1) Run VBA Code
(2) Click on Option button to select Adidas
(3) Click on Count Button
(4) Result will show 3 which is because 3 is just a total of "Adidas word" in column B, i wants the result counting how many Adidas we sold in column B which is 6
Please see attached excel, thanks in advance for your help!
[xpost][/xpost]
mrexcel.com/board/threads/coun…cell-by-new-line.1178624/
Hello,
Thank you in advance to answer my question!
I'm a beginner in VBA and i'm working on some code that can help me out to count the total number of specific product from the cell, for example in column B it contained different shoes brand with quantity we sold, i want to know the total number of adidas we sold on the entire column B, so I select the option box says adidas then click on count button, it will then give me the result of 6 next to Label1, below is my code but seems not work.
Please note that the data that i received is system generated and data are contained in one cell by new line, so that is complicated for me.
Please also see attachment of how my userform look like.
Private Sub Count_Click()
Dim result As Double
'Assign the variable
result = Application.WorksheetFunction.CountIf(Range("B2:B50"), "adidas")
'Show the result
Label1.Caption = "result"
End Sub
Display More
Thanks and appreciate that!