Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Left click and hold cell A1 and drag through cell F1 to highlight. Cick copy on the standard toolbar. Click sheet 2 at the bottom. Click Cell A1. Click paste on the standard toolbar.
Likely
I want to go like my grandfather did. Peacefully in his sleep. Not screaming at the top of my lungs like the passengers in his car.
(\__/)
(='.'=)
(")_(")

Hi,
You would do better to post in the Office Software Forum which deals with programs such as Excel.
When re-posting can you provide more detail.
For example when you click A3 -
1. Is this A3 on sheet 1, or A3 on another sheet
2. If the cell you click is A3 are you entering a value into A3 or just clicking it.
3. When you copy the range from Sheet 1 to Sheet 2 do you want the data to remain linked, i.e., A1:F1 on Sheet 2 will be linked to A1:F1 on sheet 1, or is it just an unconnected copy (like Paste Special - Values)
4. Is clicking on Cell A3 essential - would it be OK to have a button that is clicked.
5. If the data in Cell A3 changes does this trigger the copy.From what you have said here, I presume you are looking for a visual basic solution (i.e. a Macro), but please confirm.
An example of the data may also help.
Regards

Thank you for the immediate response, really appreciate it. But what I am looking for is different; maybe my question was not correct. Let me explain my requirement with example.
I have a Number of fields in Sheet 1.
Lets say I have the below three fields in Sheet 1
Name DOB Address
Each time I fill in this data and I press a submit button at the bottom of the sheet 1 (which needs to be configured) the data from sheet 1 should get transferred to another sheet having the same template of fields. This second sheet would be the master sheet.
After submitting, sheet 1 should get refreshed and the Sheet 2 should have the data.
When I enter a second set of data and press the Submit button, the second set of data should get appended below the first set of data already present in Sheet 2.In the same way for next set of data and so on.
I know this requires Macro but I don’t know how to go about it. Give me one example for writing the macro for the field and How to configure the SUBMIT button

Hi,
Here is some code to put in a button to do what you want (hopefully!)
The workbook has two worksheets named "Source" and "Master"
On the Source workbook cells A1 to G1 have the headings (name, Dob, address 1, address 2, city, state, Postal/ZIP code)
A new entry goes into cells A2 to G2, immediately underneath the headings.
On the Source workbook, use the Control Toolbox toolbar. (I don't have Excel 2007 on this PC, so I can't walk through the steps to find it)
Add a new Command Button to the Source worksheet.
Right click it (in Design mode) and select Properties and change the Caption to something useful such as Enter or Commit.
Right click again and select view codeEnter the following:
Note thatPrivate Sub CommandButton1_Click()andEnd Subwill already be there, so don't duplicate them.
Option Explicit goes before Private Sub CommandButton1_Click()Option Explicit Private Sub CommandButton1_Click() Dim intNextRow As Integer Dim rngInput As Range On Error GoTo ErrHnd 'set the input or source data range Set rngInput = Worksheets("Source").Range("A2:G2") 'find next empty row intNextRow = Worksheets("Master").Range("A1").CurrentRegion.End(xlDown).Row 'copy data to next empty row rngInput.Copy Destination:=Worksheets("Master").Range("A1").Offset(intNextRow, 0) 'delete the input data rngInput.ClearContents Exit Sub 'error handler ErrHnd: Err.Clear End SubExit design mode
Copy the headings you used in cells A1 to G1 and copy them to the Master Worksheet cells A1 to G1
Enter data into cells A2 to G2 on the Source worksheet and click the button.
The data should now be on row 2 of the Master worksheet and row 2 on the Source worksheet should now be empty.If you want to change the number of cells used for data input and copying, go back to the code and edit the line:
Set rngInput = Worksheets("Source").Range("A2:G2"), so that the range of cells matches what you are using.Regards
PS If you have further questions on Excel, including this post, please use the Office Software forum.

![]() |
Manage hyperlinks through...
|
i keep getting error
|
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |