Hi everyone,
after a long search, on the forum and on the rest of the web, i couldn't find my answer, so i'm asking you now.
I have a table (excel spreadsheet), which size is variable. Two columns are valuable to me right now, "TBF" (which is a number), and "Channel" (which has 7 different string values such as "BI", "BO", "BA", "BC", etc).
I would like, using a SQL request (on which i'm a newbie), to get a table with distinct count of BI, BO, BC, BA, etc for each TBF value.
ex:
TBF BI BO BA BC
1 37 15 8 2
2 20 5 2 0
3 25 10 5 2
etc...
I don't want to use a "for" loop, for time issues (tried already). Pivot table could be a solution, but if some value don't exist (say there's no "BC" at all), it doesn't appear. So not possible.
I tried this request:
select distinct TBF, count(distinct Channel) from " & "[" & "IOHWL_SE" & "$A1:O" & lrIO & "] order by TBF
but i'm getting "Syntax error (missing operator)" error message from Excel... and all my searches were not useful...
Many thanks for your help!
after a long search, on the forum and on the rest of the web, i couldn't find my answer, so i'm asking you now.
I have a table (excel spreadsheet), which size is variable. Two columns are valuable to me right now, "TBF" (which is a number), and "Channel" (which has 7 different string values such as "BI", "BO", "BA", "BC", etc).
I would like, using a SQL request (on which i'm a newbie), to get a table with distinct count of BI, BO, BC, BA, etc for each TBF value.
ex:
TBF BI BO BA BC
1 37 15 8 2
2 20 5 2 0
3 25 10 5 2
etc...
I don't want to use a "for" loop, for time issues (tried already). Pivot table could be a solution, but if some value don't exist (say there's no "BC" at all), it doesn't appear. So not possible.
I tried this request:
select distinct TBF, count(distinct Channel) from " & "[" & "IOHWL_SE" & "$A1:O" & lrIO & "] order by TBF
but i'm getting "Syntax error (missing operator)" error message from Excel... and all my searches were not useful...
Many thanks for your help!