I am very new to Excel. I need some help in counting unique values in each of three columns (considering them only one at a time) with respect to a parent column (the first one (A) in the image). Can you please help me out out? Thanks!
Edit: If I do a pivot table it doesn't give me count of individual columns but the final column.
Source Data:
Result Data after transformation:
Source
A B C D
p d g k
p e g k
q d h k
q f h o
r d h o
r e i m
r f h m
s d i n
s d i o
s f i o
Result
A B C D
p 2 1 1
q 2 1 2
r 3 2 2
s 2 1 2