You can use in column G:
=COUNTIF($B$3:$B$12,"*"&F15&"*")
your description seems to be incorrect in the file (central appears 4 times and not 5 times)
And in column H following formula can be used.
=SUMIF($B$3:$B$12,"*"&F15&"*",$C$3:$C$12)
This is great, now its working fine,, Thank u very muchFinding the word boundaries makes it bit tricky.
=SUMPRODUCT(--ISNUMBER(SEARCH(" "&F15&" "," "&SUBSTITUTE($B$3:$B$12,","," ")&" ",1)))
and for totals
=SUMPRODUCT(ISNUMBER(SEARCH(" "&F15&" "," "&SUBSTITUTE($B$3:$B$12,","," ")&" ",1))*$C$3:$C$12)
The formulas you provided was really great and helpful.This is great, now its working fine,, Thank u very much
See if is it ok ? |
Using Power Query And pivot Table will achieve Result |
Please follow below Staps, |
1) Convert Raw Data in Table or Name Range |
2)Using Power Query Data will be Arrange data Correct Format so will analaye Data |
3)Then insert Pivot table |
Regard |
Rahul Shewale |
Thanks Rahul for giving it a shot.hi @msharma864512 ,
See if is it ok ? Using Power Query And pivot Table will achieve Result Please follow below Staps, 1) Convert Raw Data in Table or Name Range 2)Using Power Query Data will be Arrange data Correct Format so will analaye Data 3)Then insert Pivot table Regard Rahul Shewale
You sample is inconsistent. Cell D10 shall be "PE, PE, PE". It could well be consistent for human to identify this as PE for all but it is too much to deal for a code. If you have office 365 and TEXTJOIN function then you can try which can be copied down and across.The formulas you provided was really great and helpful.
But now, I want to apply one more condition to count and sum
The details are in the attached spreadsheet.
Regards,
Manish
Thankyo Shrivallabha for providing me a great formula, and belv me this is way above my pay grade to understand the logic, but still i will try to understand the same.You sample is inconsistent. Cell D10 shall be "PE, PE, PE". It could well be consistent for human to identify this as PE for all but it is too much to deal for a code. If you have office 365 and TEXTJOIN function then you can try which can be copied down and across.
=SUMPRODUCT((TRIM(MID(SUBSTITUTE(","&TEXTJOIN(",",TRUE,$B$3:$B$12),",",REPT(" ",99)),ROW($A$1:$A$15)*99,99))=$F15)*(TRIM(MID(SUBSTITUTE(","&TEXTJOIN(",",TRUE,$D$3:$D$12),",",REPT(" ",99)),ROW($A$1:$A$15)*99,99))=N$14))
YesHi Manish,
Your requirement is quite unique for me (personally). The formula approaches sometimes become tedious to deal with as you are finding out. I am curious about cell B10 where West, West is appearing. What does it mean? 10.9 shall be added twice?
Try........
1] 1 way conditional Count, G4 copied down :
=SUMPRODUCT(1-ISERR(SEARCH(" "&F4&","," "&B$3:B$12&",")))
2] 1 way conditional Sum, H4 copied down :
=SUMPRODUCT((1-ISERR(SEARCH(" "&F4&","," "&B$3:B$12&",")))*C$3:C$12)
3] 2 ways conditional Count, I4 copied right to J4 and all copied down :
=SUMPRODUCT((TRIM(MID(SUBSTITUTE(","&TEXTJOIN(",",1,$B$3:$B$12),",",REPT(" ",99)),ROW($A$1:$A$20)*99,99))=$F4)*(TRIM(MID(SUBSTITUTE(","&TEXTJOIN(",",1,$D$3:$D$12),",",REPT(" ",99)),ROW($A$1:$A$20)*99,99))=I$3))
4] 2 ways conditional Sum, K4 array formula (Ctrl+Shift+Enter) copied right to L4 and all copied down :
=SUM(IFERROR(((TRIM(MID(SUBSTITUTE(","&TEXTJOIN(",",1,$B$3:$B$12),",",REPT(" ",99)),ROW($A$1:$A$20)*99,99))=$F4)*(TRIM(MID(SUBSTITUTE(","&TEXTJOIN(",",1,$D$3:$D$12),",",REPT(" ",99)),ROW($A$1:$A$20)*99,99))=K$3))*INDEX($C$3:$C$12,N(IF(1,MATCH(ROW($A$1:$A$20)-1,MMULT(N(ROW($1:$11)>COLUMN($A:$J)),LEN($B$3:$B$12)-LEN(SUBSTITUTE($B$3:$B$12,",",""))+1))))),""))
View attachment 67145
Hi Bosco,Thank you Bosco, this is really awesome.
Thank you very much for all the helo.
Hi Bosco,
I have tried using the formulas you provided in my model, however when i am expanding the formula to more data, its not giving any result.
Please see in the attachment.
Manish
Oh,,, is there any alternativeThis is part of your formula extracted from your file ….......TEXTJOIN(",",1,$B$3:$B$5513)…........
As per Microsoft Office Support mentioned :
https://support.office.com/en-us/article/textjoin-function-357b449a-ec91-49d0-80c3-0e8fc845691c
Your formula with 5511 range of cell which appear exceeding the limitation, maximum of 252 range of cell (text arguments).
Regards
Formula solution unlikely can help.Oh,,, is there any alternative
Are these more or less correct?
Your data at the top, an expanded table in the middle, and a pivot based on that expanded table at the bottom:
View attachment 67388
Thanks P45Cal for detailed explanation.You should never need 1000s of pivots!
If you're going to replace 1000s pivots with formulae you'll need tens of thousands of formulae, even a million or more?
If they're all going to be of the kind so far suggested by others, that's going to be a BIG load on:
and anyway, as you've found, the formulae are proving to be buggy.
- the workbook
- people using the workbooks waiting for it to recalculate
- memory
- people maintaining the formulae
If your Power Query/Pivot is buggy, it's more than likely they can be improved/corrected.
Power Query and Pivots have been designed to deal quickly with bigger data.
@bosco_yip has suggested that a formula solution won't help - and he's pretty good with formulae. Take his advice.
My question in msg#20 was to confirm that the results were correct, that's all, so that people designing solutions can know whether they're getting the right results from ANY kind of manipulation, formulae/queries/pivots; you didn't answer.