The query run for this spreadsheet is attached.
Thanks
Main Topics
Browse All TopicsI have a timesheet that I created in Excel 2007 that I want to run a query by department and populate the spreadsheet based on existing formatting.
The first department has 6 or so lines and works fine but when I run the query on a department with more than the 6 lines onlt part of the spreadsheet is adjusted.
I have checked the option to "Insert cells for new items, delete unused cells" and the checkbox "Fill down formulas in columns adjacent to data"
I have attached two samples
Please advise
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
There's no macros necessary to do what I'm looking for.
When the query runs, the adjacent colums with formatting and formulas should insert or delete to the right of the query result range based on the rows returned from the query. That result is based on the boxes checked in the query properties as I noted in my original question "I have checked the option to "Insert cells for new items, delete unused cells" and the checkbox "Fill down formulas in columns adjacent to data".
I have other spreadsheets that work fine but this one is not and I'm not sure why.
I have resolved the problem.
When you create a spreadsheet with the formatting I have described, only columns with formulas adjacent to the query results will have the rows and fornmatting inserted.
In the example spreadsheets I attached to the original post, once I inserted a formula into all the cells to the right of the query results, the correct rows and formatting were inserted corresponding to each result row returned from the query.
Business Accounts
Answer for Membership
by: saurabh726Posted on 2008-12-30 at 13:42:45ID: 23266365
Can you tell what is the background query that you run as in the code or something which you have..because this is fixed in the code/query itself which need to be edited in there...
Saurabh...