Question : select more column than in group

how can i avoid the extra join to get col4-6, but only group on col1-3?
thanks
--------------------
SELECT col1,col2,col3,col4,col5,col6
FROM tableA JOIN
(SELECT col1,col2,col3
FROM tableA
WHERE col3 IS NOT NULL
GROUP BY col1,col2,col3 HAVING COUNT(*) = 1) tableB
ON tablea.col1=tableb.col1 and tablea.col2=tableb.col2 and tablea.col3=tableb.col3

Answer : select more column than in group

Your time values are formatted as text, so when you use a formula like B2+B3 that will "coerce" text that looks like a time value to a real time value. You can use a formula like this to convert:

=SUMPRODUCT(($A$2:$A$548="Cleaning")*$B$2:$B$548)

format result cell as [h]:mm

...or you can convert the text value to time values like this

Select column B > Data > Text to Columns > Finish

Now your original SUMIF formula will work

regards, barry

Random Solutions  
 
programming4us programming4us