ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking cells (https://www.excelbanter.com/excel-programming/390307-linking-cells.html)

Kiba

Linking cells
 
Ok So I have a worksheet, currently it has a macro that copy and pastes data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link cells
so that they can update when button is pressed without unhiding?


FSt1

Linking cells
 
hi,
you can use a formula.
if you had data in sheet 1 cell A1 and you want this shown in sheet 2 cell
d5, then in D5 put the formula =sheet1!A1.
what ever is in sheet 1 cell A1 will also show in Sheet 2 cell D5.
NO macro needed.

Regards
FSt1

"Kiba" wrote:

Ok So I have a worksheet, currently it has a macro that copy and pastes data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link cells
so that they can update when button is pressed without unhiding?


Kiba

Linking cells
 
That would work but I don't want values changing constantly the macro I am
running currently insures an undo of all changes. Since there are other
macros necessary for the project to work properly, I need to do it with a
macro. But thanks anyway.

"FSt1" wrote:

hi,
you can use a formula.
if you had data in sheet 1 cell A1 and you want this shown in sheet 2 cell
d5, then in D5 put the formula =sheet1!A1.
what ever is in sheet 1 cell A1 will also show in Sheet 2 cell D5.
NO macro needed.

Regards
FSt1

"Kiba" wrote:

Ok So I have a worksheet, currently it has a macro that copy and pastes data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link cells
so that they can update when button is pressed without unhiding?


Kiba

Linking cells
 
I need a macro because the macro that runs also ensures a way to undo all of
the cahanges. So if anyone has an idea how to do this with macro I would
appreciate it. Thanks Anyway FSt1 I use to have it set that way but too
many errors ended up being saved.

"FSt1" wrote:

hi,
you can use a formula.
if you had data in sheet 1 cell A1 and you want this shown in sheet 2 cell
d5, then in D5 put the formula =sheet1!A1.
what ever is in sheet 1 cell A1 will also show in Sheet 2 cell D5.
NO macro needed.

Regards
FSt1

"Kiba" wrote:

Ok So I have a worksheet, currently it has a macro that copy and pastes data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link cells
so that they can update when button is pressed without unhiding?


Susan

Linking cells
 
i don't know anything about coding a macro to undo itself after
running (search the newsgroup, tho, because i know i've seen stuff on
this)...... but if you simply want the macro to unhide - copy - paste
- rehide by itself, you can code that into the macro. then you
wouldn't have to do it manually.
but it sounds like that isn't exactly what you want.
susan


On May 29, 3:11 pm, Kiba wrote:
I need a macro because the macro that runs also ensures a way to undo all of
the cahanges. So if anyone has an idea how to do this with macro I would
appreciate it. Thanks Anyway FSt1 I use to have it set that way but too
many errors ended up being saved.



"FSt1" wrote:
hi,
you can use a formula.
if you had data in sheet 1 cell A1 and you want this shown in sheet 2 cell
d5, then in D5 put the formula =sheet1!A1.
what ever is in sheet 1 cell A1 will also show in Sheet 2 cell D5.
NO macro needed.


Regards
FSt1


"Kiba" wrote:


Ok So I have a worksheet, currently it has a macro that copy and pastes data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link cells
so that they can update when button is pressed without unhiding?- Hide quoted text -


- Show quoted text -




Mike Fogleman

Linking cells
 
Just because a sheet is hidden, doesn't prevent it from being copied from or
pasted to. If sheet2 is hidden then this will copy a range from sheet1 to
it:

Sub copy()
Worksheets("Sheet1").Range("A1:B12").copy Worksheets("Sheet2").Range("A1")
End Sub

AFAIK, hidden sheets will prevent you from printing, but not anything else
in general.
PS. If the sheets are xlVeryHidden then that can prevent a copy/paste.

Mike F
"Kiba" wrote in message
...
Ok So I have a worksheet, currently it has a macro that copy and pastes
data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link
cells
so that they can update when button is pressed without unhiding?




Kiba

Linking cells
 
Thanks I had them set as very hidden.

"Mike Fogleman" wrote:

Just because a sheet is hidden, doesn't prevent it from being copied from or
pasted to. If sheet2 is hidden then this will copy a range from sheet1 to
it:

Sub copy()
Worksheets("Sheet1").Range("A1:B12").copy Worksheets("Sheet2").Range("A1")
End Sub

AFAIK, hidden sheets will prevent you from printing, but not anything else
in general.
PS. If the sheets are xlVeryHidden then that can prevent a copy/paste.

Mike F
"Kiba" wrote in message
...
Ok So I have a worksheet, currently it has a macro that copy and pastes
data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link
cells
so that they can update when button is pressed without unhiding?





VALIDATION

Linking cells
 
Kiba,
i am working on a worksheet of tracking of container nos on sheet1 as
displayed
x sr.no container no. bla1 bla2 bla3 bla4 bla5 bla6 bla7 bla8 bla9
blla10.....to bla53
x 1 pciu..
x 2
x
x 8600
x x x x x x x x x
Now, some of the rows remain unchanged which cud be updated at once by
copying external data to it. suppose containers are loaded in x-vessel,
vessel name is update at once for all containers. on daily basis had to
update bla15 bla52 bla35 therefore instead of updating 8600 colums & 53 rows,
i wanted to update the same data in sheet2 as mentioned below.
x contianer no ----
x
x bla1 x bla16
x bla2 x bla19
x bla3 x
x
x
x
x
x
x
x x x x x x x x x x x x xx

as mentioned above we will type the container no and the sheet2 will display
all the contents of container no. from sheet1, i can link both the sheets but
how can we update the data feeded on sheet2 into sheet 1.
pls urgently reply on the matter and enable me to produce a presentation for
my collgues.

"Kiba" wrote:

Ok So I have a worksheet, currently it has a macro that copy and pastes data
from the master sheet to several other worksheets. Some of the sheets are
hidden and inorder to copy and paste to them when the update button is
pressed I have to un hide and re hide. Is there a way that I can link cells
so that they can update when button is pressed without unhiding?



All times are GMT +1. The time now is 07:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com