Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Auto populate w/click of a 'button'

Help. I have worksheet "A" and once the user has populated columns A4 - F4
I'd like to have a button that says "Complete" and once they hit that button
all the data from the above fields automatically populates worksheet "B"'s
same field numbers on the second worksheet.- same numbering schema - in other
words the next person may have A5 - F5. How do I do this? is it even
possible?
Help
--
Shanen
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Auto populate w/click of a 'button'

Hi Shanen

In worksheet A insert a Command Button from the Control Toolbox menu, then
right click on the button and select Wiew code.

Paste this code in the codesheet that appears:

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy _
Sheets("Sheet2").Range(TargetCell)
End Sub

Change "Sheet2" to the name of worksheet B i needed.
Close the VBA editor and hit Exit Design Mode button on the Control Toolbox
menu.

Now it's time to test it :-)

Regards,
Per

"Shanen" skrev i meddelelsen
...
Help. I have worksheet "A" and once the user has populated columns A4 -
F4
I'd like to have a button that says "Complete" and once they hit that
button
all the data from the above fields automatically populates worksheet "B"'s
same field numbers on the second worksheet.- same numbering schema - in
other
words the next person may have A5 - F5. How do I do this? is it even
possible?
Help
--
Shanen


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Auto populate w/click of a 'button'

Thank You - it's working. One thing I forgot, how do I make this so that it
repeats this function for the rest of the lines. In other words you coded it
for line 4. I would like it to work for the rest of the lines thru 25 when
they are ready to be copied.

Should I make 25 'buttons' like this and each one corresponds to a
particular row?Thoughts?

Thanks again!!
--
Shanen


"Per Jessen" wrote:

Hi Shanen

In worksheet A insert a Command Button from the Control Toolbox menu, then
right click on the button and select Wiew code.

Paste this code in the codesheet that appears:

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy _
Sheets("Sheet2").Range(TargetCell)
End Sub

Change "Sheet2" to the name of worksheet B i needed.
Close the VBA editor and hit Exit Design Mode button on the Control Toolbox
menu.

Now it's time to test it :-)

Regards,
Per

"Shanen" skrev i meddelelsen
...
Help. I have worksheet "A" and once the user has populated columns A4 -
F4
I'd like to have a button that says "Complete" and once they hit that
button
all the data from the above fields automatically populates worksheet "B"'s
same field numbers on the second worksheet.- same numbering schema - in
other
words the next person may have A5 - F5. How do I do this? is it even
possible?
Help
--
Shanen



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Auto populate w/click of a 'button'

Thank you, for your reply.

The previus code will work for an unlimited number of rows.
Code below will only copy 25 rows, starting at row 4.

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
If Range(TargetCell).Row <= 28 Then
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy
Sheets("Sheet2").Range(TargetCell)
End If
End Sub

Best regards,
Per

"Shanen" skrev i meddelelsen
...
Thank You - it's working. One thing I forgot, how do I make this so that
it
repeats this function for the rest of the lines. In other words you coded
it
for line 4. I would like it to work for the rest of the lines thru 25 when
they are ready to be copied.

Should I make 25 'buttons' like this and each one corresponds to a
particular row?Thoughts?

Thanks again!!
--
Shanen


"Per Jessen" wrote:

Hi Shanen

In worksheet A insert a Command Button from the Control Toolbox menu,
then
right click on the button and select Wiew code.

Paste this code in the codesheet that appears:

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy _
Sheets("Sheet2").Range(TargetCell)
End Sub

Change "Sheet2" to the name of worksheet B i needed.
Close the VBA editor and hit Exit Design Mode button on the Control
Toolbox
menu.

Now it's time to test it :-)

Regards,
Per

"Shanen" skrev i meddelelsen
...
Help. I have worksheet "A" and once the user has populated columns
A4 -
F4
I'd like to have a button that says "Complete" and once they hit that
button
all the data from the above fields automatically populates worksheet
"B"'s
same field numbers on the second worksheet.- same numbering schema - in
other
words the next person may have A5 - F5. How do I do this? is it even
possible?
Help
--
Shanen




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Auto populate w/click of a 'button'

Thanks again, I can get line 4 to work using both macros, any additionl lines
I add do not get copied upon clicking the button?
--
Shanen


"Per Jessen" wrote:

Thank you, for your reply.

The previus code will work for an unlimited number of rows.
Code below will only copy 25 rows, starting at row 4.

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
If Range(TargetCell).Row <= 28 Then
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy
Sheets("Sheet2").Range(TargetCell)
End If
End Sub

Best regards,
Per

"Shanen" skrev i meddelelsen
...
Thank You - it's working. One thing I forgot, how do I make this so that
it
repeats this function for the rest of the lines. In other words you coded
it
for line 4. I would like it to work for the rest of the lines thru 25 when
they are ready to be copied.

Should I make 25 'buttons' like this and each one corresponds to a
particular row?Thoughts?

Thanks again!!
--
Shanen


"Per Jessen" wrote:

Hi Shanen

In worksheet A insert a Command Button from the Control Toolbox menu,
then
right click on the button and select Wiew code.

Paste this code in the codesheet that appears:

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy _
Sheets("Sheet2").Range(TargetCell)
End Sub

Change "Sheet2" to the name of worksheet B i needed.
Close the VBA editor and hit Exit Design Mode button on the Control
Toolbox
menu.

Now it's time to test it :-)

Regards,
Per

"Shanen" skrev i meddelelsen
...
Help. I have worksheet "A" and once the user has populated columns
A4 -
F4
I'd like to have a button that says "Complete" and once they hit that
button
all the data from the above fields automatically populates worksheet
"B"'s
same field numbers on the second worksheet.- same numbering schema - in
other
words the next person may have A5 - F5. How do I do this? is it even
possible?
Help
--
Shanen






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,533
Default Auto populate w/click of a 'button'

Hi again

Did you entered any date in cell A5 ? The macro will copy the downmost row
with data in column A.

Regards,
Per

"Shanen" skrev i meddelelsen
...
Thanks again, I can get line 4 to work using both macros, any additionl
lines
I add do not get copied upon clicking the button?
--
Shanen


"Per Jessen" wrote:

Thank you, for your reply.

The previus code will work for an unlimited number of rows.
Code below will only copy 25 rows, starting at row 4.

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
If Range(TargetCell).Row <= 28 Then
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy
Sheets("Sheet2").Range(TargetCell)
End If
End Sub

Best regards,
Per

"Shanen" skrev i meddelelsen
...


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Auto populate w/click of a 'button'

Yes I did. I entered data in several lines and I purposly skipped some
lines...when I press the button, only the first two rows (4 and 5) are
updating to the second sheet.
--
Shanen


"Per Jessen" wrote:

Hi again

Did you entered any date in cell A5 ? The macro will copy the downmost row
with data in column A.

Regards,
Per

"Shanen" skrev i meddelelsen
...
Thanks again, I can get line 4 to work using both macros, any additionl
lines
I add do not get copied upon clicking the button?
--
Shanen


"Per Jessen" wrote:

Thank you, for your reply.

The previus code will work for an unlimited number of rows.
Code below will only copy 25 rows, starting at row 4.

Private Sub CommandButton1_Click()
Dim TargetCell As String
TargetCell = Range("A3").End(xlDown).Address
If Range(TargetCell).Row <= 28 Then
Range(TargetCell, Range(TargetCell).Offset(0, 5)).Copy
Sheets("Sheet2").Range(TargetCell)
End If
End Sub

Best regards,
Per

"Shanen" skrev i meddelelsen
...



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
Auto-populate, Auto-copy or Auto-fill? Jay S. Excel Worksheet Functions 4 August 10th 07 09:04 PM
Using Option Button to populate formula Archgrad Excel Discussion (Misc queries) 0 August 8th 06 10:47 PM
Auto populate with value chris.howes Excel Discussion (Misc queries) 1 June 9th 06 06:33 PM
Auto populate dates waiter11 Excel Discussion (Misc queries) 2 May 28th 06 09:50 AM
auto populate jdog Excel Discussion (Misc queries) 4 October 21st 05 11:51 PM


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