Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Search Search
Search for:
Tech Support Guy > > >

Excel Conditional Copy


(!)

amjadtalib's Avatar
amjadtalib amjadtalib is offline
Member with 1 posts.
THREAD STARTER
 
Join Date: Apr 2012
Experience: Intermediate
05-Apr-2012, 10:13 AM #1
Excel Conditional Copy
Hello,

I have a question concerning 57 workbooks I have. Each one follows the same layout and has many sheets in it. I want to figure out a formula or code that can copy a certain row if it finds a few conditions are met. Essentially I have a header row, a date column in A, independent data that needs to be copied in columns B-F, and conditional data in Columns G and H. I also have data in the first few rows of Columns I-K but I do not wish to copy that. I have multiple other sheets formatted the same way which will contain the copied information.

I think it will be simpler to explain the data before I continue. The data I am using is United States Presidencies. I have divided the terms into halves. Therefore, each president may have up to 4 halves as he can serve 2 terms. This is why the data needs to be copied into multiple spreadsheets.

What I'd like to do is the following,


I wish for a row to be copied if it meets two criteria; a number (1 or 2), and whether that number is part of the first or second term. The problem is that the first or second half of either term is always denoted by a 1 or 2.This is regardless of whether is was part of the first term or second. There will be a negative difference of 1 however in Column H when the terms change. There will also be a gap of at least 1 year to be safe. I have included a workbook to help illustrate what I mean. Don't worry, this is publicly accessible data.

In the example I have, I would like a row in 'Wilson Daily' to be copied over to 'Term I, First Half' if it meets the following conditions. It must have the value 1 in Column G. The difference between it and next row in column H has to be positive or not -1. This way, the halves are separated by terms. Essentially I'll change this formula to meet my other criteria because there are 10 other sheets like 'Term I, First Half' which have different conditions. I would like it to be more automated because I have 57 workbooks like this and it is already a process to format them properly. I also would like it if the row is copied without copying Columns I-K.

I am wondering of this is at all possible and how I would go about this because I have struggled to find an answer. Thank you very much for any help. I am also glad to elaborate if it is needed.
Attached Files
File Type: xlsx Example.xlsx (138.2 KB, 29 views)
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


Tags
complex, conditional copy, criteria, excel, spreadsheet

(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑