Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I need to count two different text values within two columns.
Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain €œXX€ anyplace witihin Column A plus have €œXXXX€ in Column B. I tried countif statements with no success. Any ideas? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
One way ..
Assuming data in cols A and B are within A1:B100 With the values listed say, in D1: XX, in E1: XXXX we could put in F1: =SUMPRODUCT((ISNUMBER(SEARCH(TRIM(D1),$A$1:$A$100) )*ISNUMBER(SEARCH(TRIM(E1),$B$1:$B$100)))) SEARCH is not case sensitive. We could replace SEARCH with FIND if case sensitivty is required for the values listed in D1:E1 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Mary-Lou" wrote: I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain €œXX€ anyplace witihin Column A plus have €œXXXX€ in Column B. I tried countif statements with no success. Any ideas? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks. When I enter the array forumula, the cell value displays zero
(which is incorrect). But when I edit the function, the 'formula results" displays 163 (which is correct). Why wouldn't the 163 display in the cell? "Max" wrote: One way .. Assuming data in cols A and B are within A1:B100 With the values listed say, in D1: XX, in E1: XXXX we could put in F1: =SUMPRODUCT((ISNUMBER(SEARCH(TRIM(D1),$A$1:$A$100) )*ISNUMBER(SEARCH(TRIM(E1),$B$1:$B$100)))) SEARCH is not case sensitive. We could replace SEARCH with FIND if case sensitivty is required for the values listed in D1:E1 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- "Mary-Lou" wrote: I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain €œXX€ anyplace witihin Column A plus have €œXXXX€ in Column B. I tried countif statements with no success. Any ideas? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Mary-Lou" wrote:
Thanks. When I enter the array forumula, the cell value displays zero (which is incorrect). But when I edit the function, the 'formula results" displays 163 (which is correct). Why wouldn't the 163 display in the cell? Don't remember saying it is an array formula, requiring CSE <g. Just press normal ENTER to confirm the formula, after pasting/placing it within the formula bar (just correct the inadvertent line breaks in the formula when you copy paste it direct from the post) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I tried it both ways - same results.
"Max" wrote: "Mary-Lou" wrote: Thanks. When I enter the array forumula, the cell value displays zero (which is incorrect). But when I edit the function, the 'formula results" displays 163 (which is correct). Why wouldn't the 163 display in the cell? Don't remember saying it is an array formula, requiring CSE <g. Just press normal ENTER to confirm the formula, after pasting/placing it within the formula bar (just correct the inadvertent line breaks in the formula when you copy paste it direct from the post) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"Mary-Lou" wrote:
I tried it both ways - same results. Perhaps you could paste the actual formula you're using ?? (assume you've adapted it) In adapting to suit, pl note that entire col references (eg: A:A, B:B) cannot be used in SUMPRODUCT, and the ranges used should be identical in size, eg: $A$1:$A$1000, $B$1:$B$1000 -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hey, I did finally get it to work! I had copied the forumla several times
in my worksheet and D1 and E1 values had been adjusted in the copies - so once I put them back to what they should have been - BINGO! I will make them absolute so they don't change. Thanks very much. "Mary-Lou" wrote: I tried it both ways - same results. "Max" wrote: "Mary-Lou" wrote: Thanks. When I enter the array forumula, the cell value displays zero (which is incorrect). But when I edit the function, the 'formula results" displays 163 (which is correct). Why wouldn't the 163 display in the cell? Don't remember saying it is an array formula, requiring CSE <g. Just press normal ENTER to confirm the formula, after pasting/placing it within the formula bar (just correct the inadvertent line breaks in the formula when you copy paste it direct from the post) -- Max Singapore http://savefile.com/projects/236895 xdemechanik --- |
#8
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi!
Try this: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX")) Biff "Mary-Lou" wrote in message ... I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B. I tried countif statements with no success. Any ideas? |
#9
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks. I'm getting the same results when I tried the array Max included - 0
value displays within the cell, but when editting the function, the formula results display a value. The sentences within Column A can be really wonky and could be very long - can the funny results be because of the data within Column A? "Biff" wrote: Hi! Try this: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX")) Biff "Mary-Lou" wrote in message ... I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B. I tried countif statements with no success. Any ideas? |
#10
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi!
Try breaking the formula into 2 formulas and see what you get: Formula to count just column A: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100)))) Formula to count just column B: =SUMPRODUCT(--(B1:B100="XXXX")) Do either of these return 0? Biff "Mary-Lou" wrote in message ... Thanks. I'm getting the same results when I tried the array Max included - 0 value displays within the cell, but when editting the function, the formula results display a value. The sentences within Column A can be really wonky and could be very long - can the funny results be because of the data within Column A? "Biff" wrote: Hi! Try this: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX")) Biff "Mary-Lou" wrote in message ... I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B. I tried countif statements with no success. Any ideas? |
#11
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I broke it out, and I get results with the first one OK, but get 0 on the
seond one (but when editting the function, the formula displays a value). "Biff" wrote: Hi! Try breaking the formula into 2 formulas and see what you get: Formula to count just column A: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100)))) Formula to count just column B: =SUMPRODUCT(--(B1:B100="XXXX")) Do either of these return 0? Biff "Mary-Lou" wrote in message ... Thanks. I'm getting the same results when I tried the array Max included - 0 value displays within the cell, but when editting the function, the formula results display a value. The sentences within Column A can be really wonky and could be very long - can the funny results be because of the data within Column A? "Biff" wrote: Hi! Try this: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX")) Biff "Mary-Lou" wrote in message ... I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B. I tried countif statements with no success. Any ideas? |
#12
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I'm confused.........
You're reply to Max says you got it working. Is it working or not? The only difference, other than syntax, between mine and Max's formulas is the use of the TRIM function on the criteria cells. Biff "Mary-Lou" wrote in message ... I broke it out, and I get results with the first one OK, but get 0 on the seond one (but when editting the function, the formula displays a value). "Biff" wrote: Hi! Try breaking the formula into 2 formulas and see what you get: Formula to count just column A: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100)))) Formula to count just column B: =SUMPRODUCT(--(B1:B100="XXXX")) Do either of these return 0? Biff "Mary-Lou" wrote in message ... Thanks. I'm getting the same results when I tried the array Max included - 0 value displays within the cell, but when editting the function, the formula results display a value. The sentences within Column A can be really wonky and could be very long - can the funny results be because of the data within Column A? "Biff" wrote: Hi! Try this: =SUMPRODUCT(--(ISNUMBER(SEARCH("XX",A1:A100))),--(B1:B100="XXXX")) Biff "Mary-Lou" wrote in message ... I need to count two different text values within two columns. Column A contains sentences and Column B contains various values. Example of small sentences in Column A: Custom XX Upgrade Printing reports on XX Custom YY Upgrade Example of values in Column B: AAAA BBBB BBBB What I need to do is count groups of records, like only counting the records that contain "XX" anyplace witihin Column A plus have "XXXX" in Column B. I tried countif statements with no success. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Custom functions calculating time arguments Help Desperate | Excel Worksheet Functions | |||
CountIf Function Question | Excel Discussion (Misc queries) | |||
CountIF Function On Linked Spreadsheet | Excel Discussion (Misc queries) | |||
can you use countif function for noncontiguous cells | Excel Worksheet Functions | |||
Excel option to store trendline's coefficients in cells for use | Charts and Charting in Excel |