Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Multiple cells to one

I am trying to get cell A1 to be A2 through A31. I want to be able to select
A3 and A1 changes to it.
  #2   Report Post  
Posted to microsoft.public.excel.misc
KellTainer
 
Posts: n/a
Default Multiple cells to one


Hi

You can do this programmatically through VBA. Use this in the sheet
object that enforces this behavior.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.column = 1 And Application.ActiveCell.row
1 And Application.ActiveCell.row < 32 Then

Application.ActiveSheet.Range("A1").Value =
Application.ActiveCell.Value
End If
End Sub


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=546331

  #3   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Multiple cells to one

That errored out. Idid get this to work.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.Column = 1 And Application.ActiveCell.Row < 32 Then
Application.ActiveSheet.Range("A1").Value = Application.ActiveCell.Value
End If
End Sub

"KellTainer" wrote:


Hi

You can do this programmatically through VBA. Use this in the sheet
object that enforces this behavior.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.column = 1 And Application.ActiveCell.row
1 And Application.ActiveCell.row < 32 Then

Application.ActiveSheet.Range("A1").Value =
Application.ActiveCell.Value
End If
End Sub


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=546331


  #4   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Multiple cells to one



"Btobin0" wrote:

That errored out. I did get this to work. but still did not change any values

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.Column = 1 And Application.ActiveCell.Row < 32 Then
Application.ActiveSheet.Range("A1").Value = Application.ActiveCell.Value
End If
End Sub

"KellTainer" wrote:


Hi

You can do this programmatically through VBA. Use this in the sheet
object that enforces this behavior.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.column = 1 And Application.ActiveCell.row
1 And Application.ActiveCell.row < 32 Then

Application.ActiveSheet.Range("A1").Value =
Application.ActiveCell.Value
End If
End Sub


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=546331


  #5   Report Post  
Posted to microsoft.public.excel.misc
Btobin0
 
Posts: n/a
Default Multiple cells to one

Sorry but I forgot to mention that A1 values did not change

"Btobin0" wrote:

That errored out. Idid get this to work.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.Column = 1 And Application.ActiveCell.Row < 32 Then
Application.ActiveSheet.Range("A1").Value = Application.ActiveCell.Value
End If
End Sub

"KellTainer" wrote:


Hi

You can do this programmatically through VBA. Use this in the sheet
object that enforces this behavior.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Application.ActiveCell.column = 1 And Application.ActiveCell.row
1 And Application.ActiveCell.row < 32 Then

Application.ActiveSheet.Range("A1").Value =
Application.ActiveCell.Value
End If
End Sub


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile: http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=546331




  #6   Report Post  
Posted to microsoft.public.excel.misc
KellTainer
 
Posts: n/a
Default Multiple cells to one


Thats weird. I double check the code by creating sample file and dumping
the vba back in and it does work. Send your file to my email @
and I will see what I can do.


--
KellTainer
------------------------------------------------------------------------
KellTainer's Profile:
http://www.excelforum.com/member.php...o&userid=34322
View this thread: http://www.excelforum.com/showthread...hreadid=546331

  #7   Report Post  
Posted to microsoft.public.excel.misc
Ron Rosenfeld
 
Posts: n/a
Default Multiple cells to one

On Sun, 28 May 2006 16:55:02 -0700, Btobin0
wrote:

I am trying to get cell A1 to be A2 through A31. I want to be able to select
A3 and A1 changes to it.


Try this worksheet code.

To enter the code, right-click on the sheet tab and select View Code.

Then paste this code into the module that opens:

==========================
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim AOI As Range
Set AOI = [A3:A31]

If Not Intersect(Target, AOI) Is Nothing Then
[a1].Value = Target.Value
End If

End Sub
===========================


--ron
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
Divide a number into multiple cells rhon101 Excel Discussion (Misc queries) 2 May 21st 06 06:43 AM
Problems comparing data from multiple blank cells monkeyhop Excel Worksheet Functions 4 May 2nd 06 05:48 AM
count 2 nonblank cells on multiple worksheets April Excel Discussion (Misc queries) 1 April 18th 06 09:15 AM
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
how can i ignore blank cells when multiple cells? arash Excel Worksheet Functions 4 November 17th 05 04:35 PM


All times are GMT +1. The time now is 08:33 PM.

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"