Hi,
I trying to Group field1 with same item. But i cant get "T" group as 1 item.
Return me 2 "T"s
Code:SELECT Table1.Field1, Table1.Field2 FROM Table1 GROUP BY Table1.Field1, Table1.Field2;
Query Result:
HTML Code:Field1 Field2 K 2 P 1 T 1 T 3
In your query you're grouping by both Field1 & Field2 so the query will return all unique combinations of both fields (eg T:1, T:3)
Assuming you're looking to Sum Field2 by Field1 (ie a SUMIF) then:
Code:SELECT Table1.Field1, SUM(Table1.Field2) FROM Table1 GROUP BY Table1.Field1
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thanks!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks