Macro
Solved/Closed
Phillip Kabala
TrowaD
- Posts
- 3
- Registration date
- Monday May 13, 2013
- Status
- Member
- Last seen
- May 14, 2013
TrowaD
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
Related:
- Macro
- Macro copy and paste in next blank cell - Guide
- Macro to create new sheet and copy data - Forum - Excel
- How to make a macro run automatically when a cell value changes - Guide
- Macro to copy data from one sheet to another based on criteria ✓ - Forum - Excel
- Compare two excel sheets and highlight differences macro ✓ - Forum - Excel
6 replies
sgmpatnaik
May 13, 2013 at 03:03 AM
- Posts
- 54
- Registration date
- Tuesday April 2, 2013
- Status
- Member
- Last seen
- November 27, 2013
May 13, 2013 at 03:03 AM
Hi
Try the below code which is copy the range from a particular sheet and paste in the second sheet of last cell
Sub TransferData()
Dim LastRow As Integer
'Where is the last cell with data?
LastRow = Worksheets("Sheet2").Range("A65536").End(xlUp).Row
'Transfer data
Sheets("Sheet1").Range("A1:C7").Copy Worksheets("Sheet2").Cells(LastRow + 1, "A")
End Sub
Hope it will solve your problem otherwise please inform us
Thanks
Patnaik
Try the below code which is copy the range from a particular sheet and paste in the second sheet of last cell
Sub TransferData()
Dim LastRow As Integer
'Where is the last cell with data?
LastRow = Worksheets("Sheet2").Range("A65536").End(xlUp).Row
'Transfer data
Sheets("Sheet1").Range("A1:C7").Copy Worksheets("Sheet2").Cells(LastRow + 1, "A")
End Sub
Hope it will solve your problem otherwise please inform us
Thanks
Patnaik
TrowaD
May 13, 2013 at 11:20 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
May 13, 2013 at 11:20 AM
Hi Phillip,
You're right.
Change
Range("E10").Select
into
ActiveCell.Select
Best regards,
Trowa
You're right.
Change
Range("E10").Select
into
ActiveCell.Select
Best regards,
Trowa
Phillip Kabala
May 14, 2013 at 01:16 AM
- Posts
- 3
- Registration date
- Monday May 13, 2013
- Status
- Member
- Last seen
- May 14, 2013
May 14, 2013 at 01:16 AM
MAy be an easier way to do what I am attempting. I have a box made of 4 cells making a square.
I want to create 5 different macros so that the first shades the Active Cell as follows:
.ColorIndex = 8
.Pattern = xlSolid
End With
The second to fill the active cell and one to the R.
The third to fill the active and one to the R and one below
The fourth to fill all 4 cells
The fifth to fill all four cells but as follows
.ColorIndex = 6
.Pattern = xlSolid
End With
In every case I want the user to just activate the top left cell they want filled in and the macro to do the rest.
Am I stretching the friendship to ask how I would achieve this???
I want to create 5 different macros so that the first shades the Active Cell as follows:
.ColorIndex = 8
.Pattern = xlSolid
End With
The second to fill the active cell and one to the R.
The third to fill the active and one to the R and one below
The fourth to fill all 4 cells
The fifth to fill all four cells but as follows
.ColorIndex = 6
.Pattern = xlSolid
End With
In every case I want the user to just activate the top left cell they want filled in and the macro to do the rest.
Am I stretching the friendship to ask how I would achieve this???
TrowaD
May 14, 2013 at 11:29 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
May 14, 2013 at 11:29 AM
Not at all Phillip,
I just have some questions.
1. I'm assuming the box of 4 cells have a fixed location. What is it?
2. Users activate the top left cell. You mean of the sheet (=A1) or of the 4 cells box?
3. You want to run the macro when users activate the top left cell. But which of the 5 macro do you run? This could be dependent of the cell entry, so 5 different condition are needed.
I just have some questions.
1. I'm assuming the box of 4 cells have a fixed location. What is it?
2. Users activate the top left cell. You mean of the sheet (=A1) or of the 4 cells box?
3. You want to run the macro when users activate the top left cell. But which of the 5 macro do you run? This could be dependent of the cell entry, so 5 different condition are needed.
Didn't find the answer you are looking for?
Ask a question
Phillip Kabala
May 14, 2013 at 05:58 PM
- Posts
- 3
- Registration date
- Monday May 13, 2013
- Status
- Member
- Last seen
- May 14, 2013
May 14, 2013 at 05:58 PM
Can I attach a doc to thi. It would be easier for you to understand if you could see it.
TrowaD
May 16, 2013 at 10:17 AM
- Posts
- 2886
- Registration date
- Sunday September 12, 2010
- Status
- Moderator
- Last seen
- June 27, 2022
May 16, 2013 at 10:17 AM
I totally agree with you.
With this filesharing site you can upload your file and then post back the download link:
www.speedyshare.com
Do share your thoughts on point 2 and 3 from my previous post.
Awaiting your reply.
With this filesharing site you can upload your file and then post back the download link:
www.speedyshare.com
Do share your thoughts on point 2 and 3 from my previous post.
Awaiting your reply.