No, it's not possible to "skip columns".
Instead you could use two query functions, one to be used to get the columns A - C, the other to get the columns F and following.
First formula (A1):
=QUERY(
IMPORTRANGE("URL","Sheet Name!A2:P"),
"SELECT Col1,Col2,Col3
WHERE Col11 CONTAINS 'West'",
1
)
Second formula (F1):
=QUERY(
IMPORTRANGE("URL","Sheet Name!A2:P"),
"SELECT Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14,Col15
WHERE Col11 CONTAINS 'West'",
1
)
REMARKS:
Note that instead of Sheet Name!A2:P1000
was used Sheet Name!A2:P
as this take the whole columns instead of only 1000 rows.
I think, you need the combination of formulas. The answer is:
={QUERY({A:C},"select Col1, sum(Col2) where Col1 <>'' group by Col1"),{"filtered sum";ArrayFormula(IFERROR(VLOOKUP(UNIQUE(FILTER(A2:A,A2:A<>"")),QUERY({A:C},"select Col1, sum(Col2) where Col3 ='yes' group by Col1") ,2,0),0))}}
Explanation
It's not hard if you'll take it by parts:
={basic query, {"header"; vlookup(a, help query, 2, 0) }}
Basic query
QUERY({A:C},"select Col1, sum(Col2) where Col1 <>'' group by Col1")
It's simple, I've used Col1, Col2... notation to make it work with any range.
Vlookup
IFERROR(VLOOKUP(UNIQUE(FILTER(A2:A,A2:A<>"")), help query ,2,0),0))
We count sums with criteria (c = 'yes') in the help query.
UNIQUE(FILTER(A2:A,A2:A<>""))
part of the formula gives you a list from column 'a'.
Help query
QUERY({A:C},"select Col1, sum(Col2) where Col3 ='yes' group by Col1")
Here you may enter any conditions what you want. In this case it's Col3 ='yes'
Best Answer
Brandon, I have added three sheets to your sample spreadsheet.
"Erik Notes" has notes (as found below).
"Erik Help" holds four formulas: in A2, B2, C2 and D2. Each "runs" its own column.
In A2:
In B2:
In C2:
In D2:
The A2 formula creates the header "Names" followed by an alphabetized list of all names from the "data" sheet.
The formulas in B2 and C2 are the same in structure, differing only in the header names and what is being searched for (i.e., "Direct" or "Consult"). Every non-blank entry in A2:A (i.e., each name) is run through a VLOOKUP of a QUERY made up of only names, amounts and services from "data" where the service type contains "Direct" (or "Consult" for the C2 version) and the customer matches whatever is chosen in cell A1. Since the "Group By" is based on name only, there will only be one matching result (or none) per person.
The D2 formula creates the header followed by a similar VLOOKUP of a QUERY. This QUERY finds only UNIQUE sets of data!D2:E followed by the names. Again, the elements of the QUERY have a "Group By" based on the name, so there will be one COUNT (or none) of unique entries per name for the VLOOKUP to find.
"Erik Help 2" combines all of the above formulas into one mega-formula, in A2, if you prefer that. This one formula runs everything in A2:D:
However, you may find the separate formulas easier to understand and edit if the need arises.