PC Review


Reply
Thread Tools Rate Thread

adding data to a list

 
 
Sandy
Guest
Posts: n/a
 
      6th Aug 2007
I have 2 sheets. Sheet1 is for data entry. Sheet 2 (Say A4:Z4) collects all
the data. What I would like to do is copy Row 4 and insert it into the next
empty row starting at row 15. In other words if three records have already
been entered then the row for insertion would be Row 18. I visualise this
being done with a macro assigned to a "Save" button on Sheet1. Not sure how
to establish the next empty row. Any easy way to do this?
Sandy


 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      6th Aug 2007
Assume column A will have an entry if the row is in use

Sub ABC()
If IsEmpty(Range("A15")) Then
Set rng = Range("A15")
ElseIf IsEmpty(Range("A16")) Then
Set rng = Range("A16")
Else
Set rng = Range("A15").End(xlDown)(2)
End If
MsgBox rng.Address
End Sub


Now rng should be a reference to the first cell in the next empty row
starting with A15

--
Regards,
Tom Ogilvy




"Sandy" wrote:

> I have 2 sheets. Sheet1 is for data entry. Sheet 2 (Say A4:Z4) collects all
> the data. What I would like to do is copy Row 4 and insert it into the next
> empty row starting at row 15. In other words if three records have already
> been entered then the row for insertion would be Row 18. I visualise this
> being done with a macro assigned to a "Save" button on Sheet1. Not sure how
> to establish the next empty row. Any easy way to do this?
> Sandy
>
>
>

 
Reply With Quote
 
Sandy
Guest
Posts: n/a
 
      6th Aug 2007
Once again many thanks
Sandy

"Tom Ogilvy" <(E-Mail Removed)> wrote in message
news:8213C797-E8EE-4A76-B482-(E-Mail Removed)...
> Assume column A will have an entry if the row is in use
>
> Sub ABC()
> If IsEmpty(Range("A15")) Then
> Set rng = Range("A15")
> ElseIf IsEmpty(Range("A16")) Then
> Set rng = Range("A16")
> Else
> Set rng = Range("A15").End(xlDown)(2)
> End If
> MsgBox rng.Address
> End Sub
>
>
> Now rng should be a reference to the first cell in the next empty row
> starting with A15
>
> --
> Regards,
> Tom Ogilvy
>
>
>
>
> "Sandy" wrote:
>
>> I have 2 sheets. Sheet1 is for data entry. Sheet 2 (Say A4:Z4) collects
>> all
>> the data. What I would like to do is copy Row 4 and insert it into the
>> next
>> empty row starting at row 15. In other words if three records have
>> already
>> been entered then the row for insertion would be Row 18. I visualise this
>> being done with a macro assigned to a "Save" button on Sheet1. Not sure
>> how
>> to establish the next empty row. Any easy way to do this?
>> Sandy
>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically extend a list when adding a new data to another list JB Microsoft Excel Misc 0 25th Mar 2010 02:50 PM
Adding data to a dro-down list Martin Racette Microsoft Access Form Coding 3 14th May 2004 03:49 AM
Adding data to a dro-down list Martin Racette Microsoft Access Forms 3 14th May 2004 03:49 AM
Adding data to a list Mike Microsoft Excel New Users 2 22nd Jan 2004 03:31 PM
Adding to data to a list mushy_peas Microsoft Excel Discussion 10 26th Nov 2003 12:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:50 AM.