Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Please follow following steps
1.Right Click toolbarclick control box 2.From control box select a command button and draw it to your sheet 3.Double click the command button to open code window and paste following codes Private Sub CommandButton1_Click() Dim row As Integer, col As Integer row = 1 col = 1 Dim str1 As String While Sheet1.Cells(row, col).Value < "" str1 = Sheet1.Cells(row + 1, col).Value Sheet1.Cells(row, col + 2).Value = str1 Sheet1.Rows(row + 1).Delete row = row + 1 Wend End Sub Now on clicking the command button, you get the result Have a nice time€¦. Chris ------ Convert your Excel spreadsheet into an online calculator. http://www.spreadsheetconverter.com -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...excel/200902/1 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to move part of cell contents to another cell | Excel Discussion (Misc queries) | |||
In Excel, how do you move the contents of 3 cells into 1 cell? | Excel Discussion (Misc queries) | |||
move cell contents | Excel Discussion (Misc queries) | |||
Macro to remove contents of cell and move all other contents up one row | Excel Discussion (Misc queries) | |||
How to move cell contents | Excel Discussion (Misc queries) |