Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Auto Copy Text from one work sheet to another

I have created a 3sheet work book which auto sums all my values required. I
need to be able to offer on the 1st work sheet the option to change text in a
cell and for that text to be mapped to the folloing 2 work sheets.
Example these are room names which could change according to project, butall
other items are fine.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Auto Copy Text from one work sheet to another

Your question is very timely. I encountered a similar issue just earlier
today!
Check out this code and see if it (pretty much) does what you need:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim custLookup As Range, lRow As Long
Dim i As Range
If Target.Cells.Count 1 Or _
Target.Value = "" Then Exit Sub
With Sheets(2)
lRow = .Cells(.Rows.Count, 1).End(xlUp).Row
End With
Select Case Target.Column
Case Is = 1
Set custLookup = Sheets(2).Columns("A").Find( _
What:=Target.Value, _
LookIn:=xlValues, _
MatchCase:=False)
Set rng = Range("A1", Cells(lRow, 1))
For Each i In rng
If custLookup Is Nothing Then
i.EntireRow.Copy Sheets(2).Cells(lRow + 1, 1)
Else
If MsgBox("This customer already exists. " & _
"Would you like to add them again?", _
vbYesNo) = vbYes Then
i.EntireRow.Copy Sheets(2).Cells(lRow + 1, 1)
End If
End If
Next i
Case Is = 2
' do stuff
End Select
End Sub

Please notice, since this is a private sub, you have to right-click on a
sheet's tab, click View Code, and paste it into the window that opens. It
should run automatically when you activate a cell in Column A.


Regards,
Ryan--


--
RyGuy


"Southern Boy" wrote:

I have created a 3sheet work book which auto sums all my values required. I
need to be able to offer on the 1st work sheet the option to change text in a
cell and for that text to be mapped to the folloing 2 work sheets.
Example these are room names which could change according to project, butall
other items are fine.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Auto Copy Text from one work sheet to another

Sheet1 contains a room number in A1

Sheet2 and Sheet3 A1 contain this formula

=Sheet1!A1

Change value in Sheet1 A1 and the others will change also.

This is known as "linking".

More can be found in Help


Gord Dibben MS Excel MVP

On Thu, 10 Jan 2008 09:17:04 -0800, Southern Boy <Southern
wrote:

I have created a 3sheet work book which auto sums all my values required. I
need to be able to offer on the 1st work sheet the option to change text in a
cell and for that text to be mapped to the folloing 2 work sheets.
Example these are room names which could change according to project, butall
other items are fine.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy data from 1 work sheet to another automatically Shazza Excel Discussion (Misc queries) 7 November 13th 07 06:21 PM
How do I copy a formula from one work sheet to another? help needed please Excel Worksheet Functions 1 September 14th 06 03:59 AM
auto numbering an exel work book sheet everytime it opens or print Rugby Al Excel Discussion (Misc queries) 1 July 19th 05 06:20 PM
How do I auto copy text in a cell from one sheet to another fletcher Excel Worksheet Functions 2 April 29th 05 07:50 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM


All times are GMT +1. The time now is 03:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"