@Skip
I'm unsure how to run actual complex queries against a selected range. Do you have an example?
@UnsolvedCoding
I would like to select all the rows and columns of a particular spreadsheet to include headers (if needed to identify column names), put all data into a temporary dataset, run a query on the dataset to select a set of fields in rows that meet a particular criteria and then write the results to another worksheet. For example: Select A8 through AZ44 (the 44 being determined by finding the number of the last row with data in it), A8 contains the column names. Write the results to a dataset. Run a select against the dataset like "Select Account, Distribution_Amt, Fund, Dist from rs where Business_Unit like 'TS*' and Account not in ('12345', 23456') and Dist_Amt <> 0 and Freq = 0" where rs is the dataset and the fields are the column headers. Either in one statement put the results of the query into another worksheet starting at A9 or cycle through the rs and put the rows into another worksheet starting at A9 of that worksheet. Then, run a different query against the same rs and put those results in yet another worksheet starting at whatever column/row particular to that worksheet. Then dispose of the rs.
I just kind of need a template of code to follow. I can plug and play with my particulars. I don't have enough experience with excel to know how to do something that in access is a simple matter.
Thanks all.