Link to home
Start Free TrialLog in
Avatar of brothertruffle880
brothertruffle880Flag for United States of America

asked on

Excel 2010 - VBA or Not VBA? - Entry in Column C triggers copy/link into another sheet

I have a worksheet with a sheet named "Syummary"
I would like to have the entire line copied to the Thursday sheet if there's an X in the thursday column
I would like to have the entire line copied to the Friday sheet if there's an X in the Friday column.
I would like to have the entire line copied to the Thursday and Friday sheet if there's an X in the Thursday and Friday column.

can someone help me with the code for this?
Or perhaps this is solvable without VBA?
copy-rows-to-sheets.xlsm
Avatar of [ fanpages ]
[ fanpages ]

Hi,

A few queries:

Is column [G] in the [Friday] worksheet ("More Data") unique to that one worksheet, or will it also feature in the [Summary], [Thursday], [Saturday], &/or [Sunday] worksheets?

If specific to [Friday], when you have entered one or more values in this column, will changing the respective row in the [Summary] worksheet (say, removing the 'X' from the "Friday" column) mean the "More Data" information is lost/cleared?

Similarly, will removing an 'X' from any day-based column in the [Summary] worksheet also remove the matching row in the day-based worksheet?

Presumably the rows copied to the respective day-based worksheets will be consecutive (one after the other) even though that may not be the case in the [Summary] worksheet.

BFN,

fp.
Avatar of brothertruffle880

ASKER

The More data column should be copied as well as the other colums.  In other words, I want the entire row copied.

I will not be changing the data on the Thursday, Friday, Saturday, Sunday, etc. sheets once the data is copied and pasted to the appropriate sheet.
The only sheet where information will be input by humans is the "Summary" sheet.  The other sheets will be untouched by human hands.  They exist only to receive the copied data.

I will not be removing the X once it is input.
Thanks for your clarification.

I will look at coding a solution for you now, & will post another comment (with an attached workbook).

BFN,

fp.
ASKER CERTIFIED SOLUTION
Avatar of [ fanpages ]
[ fanpages ]

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
@fp after you pointed me here I created a variation, love to hear what you think. here
Hi Anthony,

Yesterday, I commented on your Article thread to say that the YouTube video you had referred to was marked as "Private" (so I could not see it).

The entire thread is now showing this text:
---
Experts Exchange Unauthorized Access

Permission Denied
You do not have permission to view this article.
---

Are you making changes to the content & need to re-publish it?

BFN,

fp.
yes - somewhat ironically the change I made was to more clearly credit your ABOVE original VBA/SQL solution to the problem... it's awaiting approval far as I know. I'll have another look, thanks for the heads up. I'm guessing it may be a time zone thing.

VIDEO IS HERE
Best viewed in HD and full screen, next time I'll do that better.
:)  Thanks.

I see another comment has been added to the thread (via e-mail notification), but I still can see the article content.

Is approval only granted in one region?

I am in the United Kingdom.
what I meant by time zones was that the editor who originally released it may be in a different time zone to me and not have had an opportunity to deal with it yet. I'm from Manchester, but reside in Switzerland. I think he's Stateside somewhere.. not sure why I think that . The comment is mine, saying that you can't see it! :-)
It's OK now anyway.  I can see the Article again.  I presume this is the same for everybody else.
yes, it's just been "republished".
Please note:

A slight change to the code previously provided is required/recommended.

This line (#37 in the code above):
objADODB_Connection.Provider = "Microsoft.Jet.OLEDB.4.0"

Open in new window


Now reads:
objADODB_Connection.Provider = "Microsoft." & IIf(Val(Application.Version) <= 11#, "Jet.OLEDB.4.0", "ACE.OLEDB.12.0")

Open in new window


A new workbook is attached for convenience.
Q-28107652b.xlsm