Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Entering a Value & Updating the Next Empty Cell in a Range

I would like to enter values in a single cell and have it update each time
the next consecutive empty cell in a cell range. For example, cell c5 is the
data entry cell:

Each time I enter a value the next empty cell in range a10 through a20 is
updated. And the previous entered is frozen to values. I am thinking I have
to include a "edit-copy-edit-paste special- values" macro to freeze every
entry after it places.

Every time I enter a value in c5, the below range update. Your input on how
to do this will be appreciated.

A
10 55
11 84
12 73
13 12
14 22
15
16
17
18
19
20
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 342
Default Entering a Value & Updating the Next Empty Cell in a Range

Copy this code to the macro area of the specific worksheet that you are
working on and any value entered in cell C5 of that worksheet will be copied
to the bottom of the column that starts with cell A10.

Private Sub worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("C5")) Is Nothing Then
rwRow = Range("A10").CurrentRegion.Rows _
(UBound(Range("A10").CurrentRegion.Value, 1)).Row
Range("A" & rwRow + 1).Value = Range("C5").Value
End If

End Sub

Let me know if you have further questions.

Tom

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Entering a Value & Updating the Next Empty Cell in a Range

Thanks Tom, I will update you, and thanks for being open to followup
questions - Sony

"tompl" wrote:

Copy this code to the macro area of the specific worksheet that you are
working on and any value entered in cell C5 of that worksheet will be copied
to the bottom of the column that starts with cell A10.

Private Sub worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("C5")) Is Nothing Then
rwRow = Range("A10").CurrentRegion.Rows _
(UBound(Range("A10").CurrentRegion.Value, 1)).Row
Range("A" & rwRow + 1).Value = Range("C5").Value
End If

End Sub

Let me know if you have further questions.

Tom

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Entering a Value & Updating the Next Empty Cell in a Range

Tom, Where in the worksheet do I put this code? And get it there. A
separate tab? When I do this does it mean the entry will advance to the next
empty cell? Thanks - Sony

"tompl" wrote:

Copy this code to the macro area of the specific worksheet that you are
working on and any value entered in cell C5 of that worksheet will be copied
to the bottom of the column that starts with cell A10.

Private Sub worksheet_Change(ByVal Target As Range)

If Not Intersect(Target, Range("C5")) Is Nothing Then
rwRow = Range("A10").CurrentRegion.Rows _
(UBound(Range("A10").CurrentRegion.Value, 1)).Row
Range("A" & rwRow + 1).Value = Range("C5").Value
End If

End Sub

Let me know if you have further questions.

Tom

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 342
Default Entering a Value & Updating the Next Empty Cell in a Range

This is a Macro and if you have not worked with them before it might be a
little advanced for you. I am sorry if all this just adds confusion.

To install this macro you need to open the VB Editor aka Macro Editor.
First, open your workbook, then open the VB Editor by pressing Alt F11. With
that open you should be able to see a list of worksheets in you workbook. If
not press Ctrl R to open the Project Explorer. Next, double click on the
worksheet name and the €śCode€ť window will open and focused on that specific
worksheet. Paste the code below into the €śCode€ť window and that should do it.

I re-thought my earlier code and changed it a little so use this code
instead of the previous. When installed, each time you enter something in
Cell C5 of that particular worksheet, the same value will be automatically
added to the next empty cell below cell A10. Good luck, Tom

Private Sub worksheet_Change(ByVal Target As Range)

Dim rwRow as long

If Not Intersect(Target, Range("C5")) Is Nothing Then
rwRow = Range("A10").End(xlDown).Row
Range("A" & rwRow + 1).Value = Range("C5").Value
End If

End Sub



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Entering a Value & Updating the Next Empty Cell in a Range

Tom, Thank-you. One functionality is missing, but maybe it's how I entered.
Each time I enter a value in "C5" the new entry populates "A10". The next
entry does not update cell "A11", but replaces the previously entered value
in "A10". I copied and pasted just as directed below. Any thoughts.

Your insight is much appreciated - Tom

"tompl" wrote:

This is a Macro and if you have not worked with them before it might be a
little advanced for you. I am sorry if all this just adds confusion.

To install this macro you need to open the VB Editor aka Macro Editor.
First, open your workbook, then open the VB Editor by pressing Alt F11. With
that open you should be able to see a list of worksheets in you workbook. If
not press Ctrl R to open the Project Explorer. Next, double click on the
worksheet name and the €śCode€ť window will open and focused on that specific
worksheet. Paste the code below into the €śCode€ť window and that should do it.

I re-thought my earlier code and changed it a little so use this code
instead of the previous. When installed, each time you enter something in
Cell C5 of that particular worksheet, the same value will be automatically
added to the next empty cell below cell A10. Good luck, Tom

Private Sub worksheet_Change(ByVal Target As Range)

Dim rwRow as long

If Not Intersect(Target, Range("C5")) Is Nothing Then
rwRow = Range("A10").End(xlDown).Row
Range("A" & rwRow + 1).Value = Range("C5").Value
End If

End Sub

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 36
Default Entering a Value & Updating the Next Empty Cell in a Range

tom, One more question. Within the worksheet I have other data entry cells
with references to specific cell ranges. I want to set up for the same type
of entry.

In VBA I copied the code in and edited the references (enter in K29, update
next consecutive empty cell in range c243:C254.

The original code is in Template, the copied and edited code in Template2.
I can't get Template2 to run though. Both, when you open the module are
named "worksheet".

What do I have to adjust to be able to enter updates from both modules?

Thank-you.

"tompl" wrote:

This is a Macro and if you have not worked with them before it might be a
little advanced for you. I am sorry if all this just adds confusion.

To install this macro you need to open the VB Editor aka Macro Editor.
First, open your workbook, then open the VB Editor by pressing Alt F11. With
that open you should be able to see a list of worksheets in you workbook. If
not press Ctrl R to open the Project Explorer. Next, double click on the
worksheet name and the €śCode€ť window will open and focused on that specific
worksheet. Paste the code below into the €śCode€ť window and that should do it.

I re-thought my earlier code and changed it a little so use this code
instead of the previous. When installed, each time you enter something in
Cell C5 of that particular worksheet, the same value will be automatically
added to the next empty cell below cell A10. Good luck, Tom

Private Sub worksheet_Change(ByVal Target As Range)

Dim rwRow as long

If Not Intersect(Target, Range("C5")) Is Nothing Then
rwRow = Range("A10").End(xlDown).Row
Range("A" & rwRow + 1).Value = Range("C5").Value
End If

End Sub

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
If cell not empty, then display from range puiuluipui Excel Discussion (Misc queries) 7 October 3rd 09 08:01 PM
Referring to a cell by entering an integer; RANGE functions Tim Murray Excel Worksheet Functions 5 May 24th 08 11:21 PM
Preventing user entering duplicate values in a cell range Thomas Peters Excel Worksheet Functions 1 November 30th 05 08:00 PM
Formula is entering a default time when it comes across an empty cell.. Howie Excel Worksheet Functions 10 November 16th 05 11:34 AM
Picking up the last non-empty cell in a given range zhj23 Excel Discussion (Misc queries) 4 June 1st 05 12:34 AM


All times are GMT +1. The time now is 10:22 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"