Help... VBA Code to copy and paste value in a new sheet in last row

santhoshlk

Board Regular
Joined
Feb 6, 2006
Messages
206
Dear Friends.

Pls help me to develop my below macro.
I have a workbook with 2 sheets, say "Entry" and "List"
"Entry" sheet has the following cells B6 and D7.
What I need is a command button in Entry Sheet, once I enter any data in B6
and D7 and if I click the command button macro should copy the cell "Entry(B6)" and paste value in cell "List(A1)' also copy cell "Entry(D7)" and paste value in cell "List(B2)".
a msg box to be appear and say "Your entry has updated" and the sheet "Entry" to be active and cells are cleared for the next new entry.

IMPORTANT is whenever I update the entry by clicking the command, the data should be copied in sheet "List" in next row so I keep the entry records in that sheet.

Please help.

Thanks in advance. S
 
Click in the range of the merged cells. Then look in the small box above cell "A1" referred to as the "Name Box" and see what cell is shown there. Then change the script to refer to this cell.
 
Upvote 0

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Hi My Answer Is This,

"What cell is in the upper left corner of the Merged cells?
Change the script to refer to the cell in the upper left corner of the Merged cells."

The upper left corner of the merged cell is A20. (Where A21 is merged with C21+D21+C22+D22)

So how could i refer the cell
 
Upvote 0
The upper left corner of the merged cell is A20. (Where A21 is merged with C21+D21+C22+D22)

That sounds more like the upper left cell within the merged cells is A21 not A20 and how can you merge A21 ,C21+D21+C22+D22 without anything in column B:confused:
 
Upvote 0
You said in post # 12:
"The upper left corner of the merged cell is A20."
Then change your scripts last line of code to this:


Sheets("Entry").Range("A20").ClearContents
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,794
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top