Forum Discussion
How to insert a row in worksheet A and have it auto populate in worksheet B
It may be possible to do what you're asking (although I'm not sure what it is, short of writing a VBA macro)....
Well, there is this: if this is a one-time, one-off situation, what you could do is just enter all of your information into the first sheet, in any order at all, and then do a Data....Sort on the resulting table, sorting by Column A in Spreadsheet A....and only then use your copy formula to put things into their corresponding rows in Spreadsheet B. That would be at best a "quick and dirty" solution. But can I first ask a question or two?
What I'd like to ask is if you could give us a bit more background information on why you're trying to essentially have Spreadsheet B mimic Spreadsheet A (except for some of the prettier formatting features)?
If anything, given the nicer formatting of A, that would appear to be more of an "output" or report sheet; B, on the other hand, has more the appearance of a "raw" database. One of the important aspects of designing a well-functioning Excel application is differentiating between Input and Output....and letting capabilities like Pivot Tables or Power Query take care of the Output at a later and separate stage.
Because you're entering the information (it would appear from your description) into what looks like the Output sheet, this seems backwards to me. So that's why I'm asking for a more complete description of what you're wanting to accomplish?; why you've got the two spreadsheets you have now?...what is the ultimate goal being served?
It's possible that re-thinking the design from the ground up will result in a far more effective end product.
- jessica-tls1Dec 08, 2019Copper Contributor
Thank you, for the reply. This is what im working on.
Sheet A - Input all data.
Part of this data will be the chart ( Type Manufacturer etc. )
Depending on the size of the project we will be adding rows of data to the chart.
Sheet B - Output - We only want worksheet B to show the data in the chart. Because this data will be sent out to our team for the project. While the other information in A will be internal. This way our team can just print or save sheet B for external use.
I hope this helps with the why.
- mathetesDec 08, 2019Silver Contributor
Jessica -- thanks for that explanation. I will admit to being still a bit confused. You speak of "our team" as receiving 'just the data" as it appears on Sheet B. But then refer to the information on Sheet A as "internal" ....leaving me wondering "isn't 'our team' on the same team as 'internal'?" But I do see something I hadn't noted before, that there is different info on A than on B, and more hidden columns on B (a LOT) ....which leads me to a different suggestion altogether.
I'm going to suggest that you familiarize yourself with Custom Views. And I've created some using your example sheet.
See the attached revised version of your original example. When you open it you'll see Sheet A pretty much as you original created it. You'll see (don't be alarmed) that I removed the bottom cell, the one that spanned the entire width, with what looked to be key "footnote' kind of info. I say "Don't be alarmed" because it still is available, as a custom footer that prints whenever you print this sheet.
So you'll open the sheet to see pretty much what Sheet A had to begin with. Go in the main menu to View.....and scroll down to Custom Views. Pick "Team B (orig)" and you'll see what you had in your Sheet B as you uploaded it.
Then--I noticed that you'd hidden a large number of columns in Sheet B, so I created another Custom View....."Team B (full)" which includes all of those columns.
Now, the thing to be aware of here is that these are all simply different views--predefined views--of one and the same spreadsheet. I even changed the column headings for the different (Team A vs Team B) views, by hiding and revealing different header rows.
Taking this as an example, I trust you can see how a single spreadsheet can be used as both input and output....and if your "our team" that uses B IS expected to enter data into all those hidden columns, that capability is also available. This obviates the need for any elaborate formulas or VBA macros to help keep Sheet B in sync with Sheet A. They are simply different (custom) views of the same sheet.
To add to all this, if there are things that you want the people in the field NOT to be able to change, you can use the Protection capability to lock cells such that only you (or some other authorized person) can change them.
If all this is NOT what you're actually trying to accomplish, then I apologize but I need a more complete description of what those out in the field will be doing, what the "internal" folks are doing....why different views of the one sheet wouldn't be viable for that business need.
- jessica-tls1Dec 09, 2019Copper Contributor
Thank you, for the input.
Do you know what the VBA Macro code would be to have it perform the insert function i need.
Just a basic ( when i insert a row in worksheet A , then insert a row in worksheet B )