Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hello -
I have a basic spreadsheet with the following information. Cells A2:A11 contain basic number valus. Cell A1 is blank. What I would like to accomplish is for a user to enter a value into cell A1 and have that information replace the value in A2 and shift the rest of the values in the column down. I only want to store 10 numbers (ie A2:A11) at a time. Can anyone provide me with the knowledge on how to accomplish this? Thanks! |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
'-----------------------------------------------------------------
Private Sub Worksheet_Change(ByVal Target As Range) '----------------------------------------------------------------- Const WS_RANGE As String = "A1" On Error GoTo ws_exit: Application.EnableEvents = False If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then Range("A2:A10").Copy Range("A3:A11") Range("A2").Value = Target.Value End If ws_exit: Application.EnableEvents = True End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH Bob Phillips (remove xxx from email address if mailing direct) wrote in message oups.com... Hello - I have a basic spreadsheet with the following information. Cells A2:A11 contain basic number valus. Cell A1 is blank. What I would like to accomplish is for a user to enter a value into cell A1 and have that information replace the value in A2 and shift the rest of the values in the column down. I only want to store 10 numbers (ie A2:A11) at a time. Can anyone provide me with the knowledge on how to accomplish this? Thanks! |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Dan Try the attached. It's a short macro linked to the worksheet change event. +-------------------------------------------------------------------+ |Filename: Book1.zip | |Download: http://www.excelforum.com/attachment.php?postid=4725 | +-------------------------------------------------------------------+ -- mrice Research Scientist with many years of spreadsheet development experience ------------------------------------------------------------------------ mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931 View this thread: http://www.excelforum.com/showthread...hreadid=538587 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This is perfect! Thanks so much.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Delete - Shift Cells UP problem | Excel Discussion (Misc queries) | |||
Help adding text values | Excel Worksheet Functions | |||
I need to shift cells down only to a point w/o disturbing the bot. | Excel Discussion (Misc queries) | |||
Convert data type of cells to Text,Number,Date and Time | Excel Worksheet Functions |