Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Sending data from one cell to another

Sorry if this is posted twice-

I would like to have data from one cell get sent to another cell in the same
worksheet. But I don't want to put a formula in the second cell to grab that
data from the first cell. Is this possible?

For example, if I type in my first name in A1, I would like it to
automatically appear in cells A2, A3, and A4. However, I would like to have
the flexibility to type in my last name into A3 and have that then
automatically appear in A4 as well.

Thanks for your time,
Maria



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Sending data from one cell to another

Insert this event macro in the worksheet code area:

rivate Sub Worksheet_Change(ByVal Target As Range)
Dim A1 As Range, A3 As Range, A4 As Range
Dim t As Range, A24 As Range
Set A1 = Range("A1")
Set A3 = Range("A3")
Set A4 = Range("A4")
Set A24 = Range("A2:A4")
Set t = Target
If Intersect(t, Union(A1, A3)) Is Nothing Then Exit Sub
Application.EnableEvents = False
If Intersect(t, A3) Is Nothing Then
A1.Copy A24
Else
A3.Copy A4
End If
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200836


"Maria" wrote:

Sorry if this is posted twice-

I would like to have data from one cell get sent to another cell in the same
worksheet. But I don't want to put a formula in the second cell to grab that
data from the first cell. Is this possible?

For example, if I type in my first name in A1, I would like it to
automatically appear in cells A2, A3, and A4. However, I would like to have
the flexibility to type in my last name into A3 and have that then
automatically appear in A4 as well.

Thanks for your time,
Maria



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default Sending data from one cell to another

Formulas cannot "send" data anywhere.

In A2, A3 and A4 you must have formulas linking to A1 by =A1

But if you overwrite the formula in A3, it no longer is a formula and A4 is
still linked to A1 so can't return what you typed in A3

What you want to occur can only be done through VBA code


Gord Dibben MS Excel MVP

On Thu, 5 Mar 2009 11:51:02 -0800, Maria
wrote:

Sorry if this is posted twice-

I would like to have data from one cell get sent to another cell in the same
worksheet. But I don't want to put a formula in the second cell to grab that
data from the first cell. Is this possible?

For example, if I type in my first name in A1, I would like it to
automatically appear in cells A2, A3, and A4. However, I would like to have
the flexibility to type in my last name into A3 and have that then
automatically appear in A4 as well.

Thanks for your time,
Maria



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
Sending data from a form to another worksheet Monte Milanuk Excel Discussion (Misc queries) 0 June 14th 07 12:45 AM
Sending Data to Access Database PattiP Excel Discussion (Misc queries) 1 December 12th 05 10:47 PM
Sending data to Access Database PattiP Excel Discussion (Misc queries) 2 December 11th 05 08:25 PM
Sending data to cell Ken Rock Excel Discussion (Misc queries) 2 July 15th 05 02:47 PM
sending data from one cell to another (not using copy & paste) Charlie Payne Excel Worksheet Functions 3 December 6th 04 03:28 PM


All times are GMT +1. The time now is 11:53 AM.

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

About Us

"It's about Microsoft Excel"