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:

Month Text Week Ending Column 1Column 2Column 3Column 4Column 5Column 6
Dec'1819-DecABC, DEF, GHIJK, LMNOPQ, RST, UVWABC, DEF, GHIJK, LMNOPQ, RST, UVWABC, DEF, GHIJK, LMNOPQ, RST, UVW
Nov'1802-NovABC, DEF, GHIJK, LMNOPQ, RST, UVWABC, DEF, GHIJK, LMNOPQ, RST, UVWABC, DEF, GHIJK, LMNOPQ, RST, UVW
Oct'1806-OctABC, GHIJK, LMNOPQ, RST, UVWABC, GHIJK, LMNOPQ, RST, UVWABC, GHIJK, LMNOPQ, RST, UVW
Dec'1819-DecABC, DEF, GHIJK, LMNOPQ, RSTABC, DEF, GHIJK, LMNOPQ, RSTABC, DEF, GHIJK, LMNOPQ, RST
Nov'1802-NovABC, DEF, GHIJKUVWABC, DEF, GHIJKUVWABC, DEF, GHIJKUVW
Oct'1806-OctABC, DEF, LMNOPQABC, DEF, LMNOPQABC, DEF, LMNOPQ
Dec'1819-DecGHIJKOPQ, UVWGHIJKOPQ, UVWGHIJKOPQ, UVW
Nov'1802-NovDEF, GHIJK, LMNRST, UVWDEF, GHIJK, LMNRST, UVWDEF, GHIJK, LMNRST, UVW
Oct'1806-OctLMNUVWLMNUVWLMNUVW

<tbody>
</tbody>

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.
 

ranman256

Well-known Member
Joined
Jun 17, 2014
Messages
1,820
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,
 

Forum statistics

Threads
1,085,715
Messages
5,385,419
Members
401,945
Latest member
Paul82

Some videos you may like

This Week's Hot Topics

Top