Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Countif
Here is the statement I am using.
For Each ce In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row) ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) Next ce However the data in Range k:k is actually on a different sheet. How do I get it to look on sheet "Data Sheet" range k:k. Column a2:a is on sheet "Sales Reps". Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Countif
Change
ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) to ce.Offset(0, 1) = WorksheetFunction.CountIf(Worksheets("Sheet2").Ran ge("k:k"), ce.Value) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Busybee" wrote in message ... Here is the statement I am using. For Each ce In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row) ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) Next ce However the data in Range k:k is actually on a different sheet. How do I get it to look on sheet "Data Sheet" range k:k. Column a2:a is on sheet "Sales Reps". Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Countif
Thanks a ton Chip! Truly a lifesaver!
"Chip Pearson" wrote: Change ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) to ce.Offset(0, 1) = WorksheetFunction.CountIf(Worksheets("Sheet2").Ran ge("k:k"), ce.Value) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Busybee" wrote in message ... Here is the statement I am using. For Each ce In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row) ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) Next ce However the data in Range k:k is actually on a different sheet. How do I get it to look on sheet "Data Sheet" range k:k. Column a2:a is on sheet "Sales Reps". Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Countif
ok. im having a problem now.
if those cells match then i need it to count the corresponding cells in sheet "data sheet" col BW that contain a 1. "Chip Pearson" wrote: Change ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) to ce.Offset(0, 1) = WorksheetFunction.CountIf(Worksheets("Sheet2").Ran ge("k:k"), ce.Value) -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Busybee" wrote in message ... Here is the statement I am using. For Each ce In Range("a2:a" & Cells(Rows.Count, 1).End(xlUp).Row) ce.Offset(0, 1) = WorksheetFunction.CountIf(Range("k:k"), ce.Value) Next ce However the data in Range k:k is actually on a different sheet. How do I get it to look on sheet "Data Sheet" range k:k. Column a2:a is on sheet "Sales Reps". Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I use a countif function according to two other countif fu. | Excel Worksheet Functions | |||
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") | Excel Discussion (Misc queries) | |||
COUNTIF or not to COUNTIF on a range in another sheet | Excel Worksheet Functions | |||
COUNTIF Help | Excel Discussion (Misc queries) | |||
COUNTIF in one colum then COUNTIF in another...??? | Excel Worksheet Functions |