Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting literals in cells
I'm trying to figure a quick way using a macro to count the results of
a survey recorded in an Excel spreadsheet. Each record in the survey has cells that may contain "Yes", "No", "Maybe", "Sometimes" and "Occasionally". Is there a macro that can count occurrences of each literal and report their totals? Thanks, Joeyej |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Counting literals in cells
Hi Joeyei,
In excel you can use the CountIf worksheet function: =CountIf(A1:A100,"Yes") If you need to do this in code: Dim Var As Long Var = Application.CountIf(Range("A1:A100"), "Yes") --- Regards, Norman "Joeyej" wrote in message om... I'm trying to figure a quick way using a macro to count the results of a survey recorded in an Excel spreadsheet. Each record in the survey has cells that may contain "Yes", "No", "Maybe", "Sometimes" and "Occasionally". Is there a macro that can count occurrences of each literal and report their totals? Thanks, Joeyej |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
counting cells that are 0 in a range of non-contiguous cells | Excel Worksheet Functions | |||
Query counting cells in a row that exactly match cells in another | Excel Discussion (Misc queries) | |||
linked cells change to literals | Excel Discussion (Misc queries) | |||
Complicated counting of cells (based on other cells contents) | Excel Worksheet Functions | |||
Copy a cell value and add literals | Excel Worksheet Functions |