Counting text in multiple columns together

khandelwal

New Member
Joined
Dec 19, 2018
Messages
4
Hi,

I want to count a specific text in a column and also want to do this for multiple columns (6 columns in a single table). Need help. I am only able to do it one column at a time.

Sample Table:

[TABLE="width: 898"]
<tbody>[TR]
[TD]Month Text[/TD]
[TD] Week Ending[/TD]
[TD] Column 1[/TD]
[TD]Column 2[/TD]
[TD]Column 3[/TD]
[TD]Column 4[/TD]
[TD]Column 5[/TD]
[TD]Column 6[/TD]
[/TR]
[TR]
[TD]Dec'18[/TD]
[TD="align: right"]19-Dec[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[/TR]
[TR]
[TD]Nov'18[/TD]
[TD="align: right"]02-Nov[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[/TR]
[TR]
[TD]Oct'18[/TD]
[TD="align: right"]06-Oct[/TD]
[TD]ABC, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[TD]ABC, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[TD]ABC, GHIJK, LMN[/TD]
[TD]OPQ, RST, UVW[/TD]
[/TR]
[TR]
[TD]Dec'18[/TD]
[TD="align: right"]19-Dec[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST[/TD]
[TD]ABC, DEF, GHIJK, LMN[/TD]
[TD]OPQ, RST[/TD]
[/TR]
[TR]
[TD]Nov'18[/TD]
[TD="align: right"]02-Nov[/TD]
[TD]ABC, DEF, GHIJK[/TD]
[TD]UVW[/TD]
[TD]ABC, DEF, GHIJK[/TD]
[TD]UVW[/TD]
[TD]ABC, DEF, GHIJK[/TD]
[TD]UVW[/TD]
[/TR]
[TR]
[TD]Oct'18[/TD]
[TD="align: right"]06-Oct[/TD]
[TD]ABC, DEF, LMN[/TD]
[TD]OPQ[/TD]
[TD]ABC, DEF, LMN[/TD]
[TD]OPQ[/TD]
[TD]ABC, DEF, LMN[/TD]
[TD]OPQ[/TD]
[/TR]
[TR]
[TD]Dec'18[/TD]
[TD="align: right"]19-Dec[/TD]
[TD]GHIJK[/TD]
[TD]OPQ, UVW[/TD]
[TD]GHIJK[/TD]
[TD]OPQ, UVW[/TD]
[TD]GHIJK[/TD]
[TD]OPQ, UVW[/TD]
[/TR]
[TR]
[TD]Nov'18[/TD]
[TD="align: right"]02-Nov[/TD]
[TD]DEF, GHIJK, LMN[/TD]
[TD]RST, UVW[/TD]
[TD]DEF, GHIJK, LMN[/TD]
[TD]RST, UVW[/TD]
[TD]DEF, GHIJK, LMN[/TD]
[TD]RST, UVW[/TD]
[/TR]
[TR]
[TD]Oct'18[/TD]
[TD="align: right"]06-Oct[/TD]
[TD]LMN[/TD]
[TD]UVW[/TD]
[TD]LMN[/TD]
[TD]UVW[/TD]
[TD]LMN[/TD]
[TD]UVW[/TD]
[/TR]
</tbody>[/TABLE]

I was not able to format it here.

Now I want to count e.g. "*OPQ*" in the table from column 1, parallelly I want to count "*UVW*" from column 4 grouped by either month or Week ending.

I hope I have explained my requirement.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
your table is not normalized and wouldn't be designed this way,
but you can make 6 queries, 1 for each column.
combine them in UNION query,
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top