Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Duplicating Selected Rows in Excel 1

Status
Not open for further replies.

Texanite

Technical User
Aug 21, 2002
75
US
I have a spreadsheet with 17 columns.. the last 13 are the months of the year with a total in the 13th column (column S). I need a statement that will search S338-S353, S358-S360 and S376 - S390 etc (for a total of 90 rows) and if it finds the total is not equal to zero then copy the entire row beginning in A574. When I am through, if there are only 3 rows with a total, then I should only have 3 rows. One beginning in A574 another beginning at A575 and the last one beginning at A576 as the result. Any help anyone could give me would be appreciated.

Thanks
Texanite
 
Hi Texanite,

To me, it sounds like you're attempting to isolate data that meets your criteria of not being "0".

An excellent utility for isolating or extracting data based on whatever criteria is required, is Excel's "database extraction" component. On the menu, it's: Data - Filter - Advanced Filter.

This Advanced Filter is unfortunately not used very often and not used to its full potential because of less than adequate instructions, and a couple of bugs that Microsoft has failed to eliminate. These two bugs do NOT present a problem, however, when using VBA to extract the data.

If you'd like, I can assist in giving you a "jump start". The best approach would be for you to email me your file. I'll then insert the VBA code and return it. If you happen to have sensitive data, perhaps you could replace it with fictitious data that still reflects the type of data you're working with.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Thanks Dale... after sending Dale my file, using Excel's database extraction function, he was able to extract from a table of 17 columns, 234 rows on 68 separate sheets just the rows I needed and put them in one tab in the format I needed for upload to our accounting system. With his file extraction function macro, he is saving me hours of work. Thanks again Dale.

Texanite
 
Hi there Dale...
Any chance of having a copy of the file? I am currently attempting to extract data form one "Total" xls to separate sheets. Extracting, row by row throughout the whole worksheet I have a proceedure for BUT letting a user select which rows they wish to extract - is where I am hitting the problems.... Any advice would be appreciated
Kind Regards
Kab kabnl@yahoo.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top