Hi, friends.
Total Computer how many= ?
Total TV how many= ?
I want the macro to count them.
You want to help.
Thank you.
Hi, friends.
Total Computer how many= ?
Total TV how many= ?
I want the macro to count them.
You want to help.
Thank you.
Putin D7 and copy down.Formula:
Please Login or Register to view this content.
Putin E7 and copy down.Formula:
Please Login or Register to view this content.
Or here is an option if it has to be in a macro:![]()
Please Login or Register to view this content.
Last edited by Solus Rankin; 12-17-2013 at 03:00 PM.
Thanks,
Solus
Please remember the following:
1. Use [code] code tags [/code]. It keeps posts clean, easy-to-read, and maintains VBA formatting.Highlight the code in your post and press the # button in the toolbar.2. Show appreciation to those who have helped you by clickingbelow their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
"Slow is smooth, smooth is fast."
Hi Solus Rankin;
Thank you very much.
Red line I get the error.
What's the problem?
Sub test()
Dim l As Long
For l = 7 To UsedRange.Rows.Count
Cells(l, 4).Value = Application.WorksheetFunction.CountIf(Range(Cells(l, 10), Cells(l, 17)), "Computer")
Cells(l, 5).Value = Application.WorksheetFunction.CountIf(Range(Cells(l, 10), Cells(l, 17)), "TV")
Next l
End Sub
Where did you copy the code to?
maybe change to![]()
Please Login or Register to view this content.
Try this code......
Please find the attached sheet to see if this is what you want.![]()
Please Login or Register to view this content.
Regards
sktneer
Treat people the way you want to be treated. Talk to people the way you want to be talked to.
Respect is earned NOT given.
FWIW:
![]()
Please Login or Register to view this content.
Hi JOHN H. DAVIS;
I want you,![]()
Please Login or Register to view this content.
Red text instead
The last line
get. (uncertain because the last line.)
Possible?
This beautiful example
![]()
Please Login or Register to view this content.
Will this work?
![]()
Please Login or Register to view this content.
Sorry. you're right.
Is it possible to do this?
If the cell is empty,
"0" not.
get empty cells.
(Example file
10 row)
Maybe:
![]()
Please Login or Register to view this content.
great
Thank you very much.
dear JOHN H. DAVIS
dear sktneer
Thank you.
dear Solus Rankin
Thank you.
Have nice day.
You're welcome. Glad to help out and thanks for the feedback.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks