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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Office excel - how to copy field with comments, conditions, background etc. to another sheet ?

Status
Not open for further replies.

spamator12

Programmer
Dec 28, 2022
5
PL
Like in title. I have MAIN sheet and I need to to copy most of the data to the other one, so when I change something in main, the others sheets are immediately updated.


How to achieve this? The:

=$DEFAULT-SHEET.$C$100

is NOT working for comments, conditions, text color, etc.
 
Hi, nope. I'm talking about simple office excel sheet.

Lets suppose we have 3 sheets:
MAIN | OTHER1 | OTHER2

I have data in main that is copied to other sheets. BUT there are not copied with comments, conditions, text color, backgroud color, etc. When I change the specific field color text for example, I need to have this change visible in other sheets. But with command:
=$MAIN.$C$100
only the value is changed.
 
That's because

=$MAIN.$C$100

isn't copying a cell. It is a function that returns a value from a cell

Instead you need a macro or VBA code similar to the following:

Code:
[COLOR=blue]    Application.CutCopyMode = False
    Range("A1").Copy [COLOR=green]' Source[/color]
    Range("B1").PasteSpecial xlPasteAll, xlPasteSpecialOperationNone [COLOR=green]' Destination[/color]
    Application.CutCopyMode = False[/color]
 
ehhh I don't want to use VBA. I better do that in html/css/d3.js

I thought there is just an simple option to copy ALL (underline, background, conditions, etc.) field data or SOME (like value only).

Thanks!
 
You may want to investigate the Copy / Paste Special

PasteSpecial_gmvwyn.png


You have different options there, hopefully you'll find what you're looking for....

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
@spamator12,

As strongm explicitly stated that what you thought was COPY s not COPY.

But this has seemed to go in one ear, so to speak, and out of the other when you replied...
I thought there is just an simple option to copy ALL (underline, background, conditions, etc.) field data or SOME (like value only).

And the answer to that statement in isolation is, "YES, that's what COPY does.

HOWEVER, what YOU thought was COPY is not COPY but a formula data assignment. Formulas do not COPY anything!

So lets use the proper terminology so we can all understand what you really want to do.



Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
Lots of folks ASSUME a solution and then ask here at Tek Tips how to do the thing that they ASSUME. Too often, those ASSUMPTIONS are inirrect!

So how about telling us WHAT has to be done and WHY it needs to be done and describe the sheet. Is it a table or a chart or a list or what.

Then we can suggest one or more way to accomplish the task. Depending on the structure, it may be as simple as a refreshable query, selecting some or all fields.

Skip,
[sub]
[glasses]Just traded in my OLD subtlety...
for a NUance![tongue][/sub]
"The most incomprehensible thing about the universe is that it is comprehensible" A. Einstein

You Matter...
unless you multiply yourself by the speed of light squared, then...
You Energy!
 
I guess "=$DEFAULT-SHEET.$C$100" at first post describe everything well. Copy/duplicate/correlation/synergy/adjusting/dependency what ever you call it (english is not my main) at this specific program... @SkipVought it was properly described, just read it again, ass smacking around is not helping.

Anyway, I already did everything in node (I'm doing excel things only few times a year, so adding VBA was not my priority ATM - @strongm , thanks man!), so If somebody put an answer, it will be for other users, that want to relate in a same way (with comments, conditions, text color, etc.) so then you change some fields in MAIN sheet and it is automatically adjusted (in a SAME WAY) in others sheets (you can choose what field to mutate manually).
 
It is not a problem to copy the contents of some cells to another place, with contents, formulas, comments, but still there may be some issues with names, merged cells, formulas.
However, it looks like you need to have formats and comments dynamic in the other sheet. If so, it requires either manual copy/paste special action after each change, or automation with VBA, or, finally, redesigning the data and simplifying processing.
As Skip stated, 'we can suggest one or more way to accomplish the task' but this requires to be open for other solutions, no direct way to have the same dynamic contents in two places in excel.

combo
 
@combo y I know, @strongm give proper VBA code, but I don't have time to practice it. Node.js was fast and good choice, cause I can compare different calculations and after few code additions, other dev can too (via redis and socket.io). Dynamic content is a nice name for the "thing" ("copy") I wanted to achieve.

Thanks for all of you for help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top