Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
We need to come up with a way to remove the last 4 characters from the
contents of a cell. I tried a macro, but wasn't sure how to make it go to the next cell. For example, I select a cell, press end, backspace 4 positions and then hit enter. Works great for 1 cell! Is there a way to get the macro to repeat all the way down the spreadsheet? As always, Thanks for the help! Ken -- akkrug |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Ken,
Select the cells and run this macro: Sub Remove4() Dim myCell As Range For Each myCell In Selection myCell.Value = Left(myCell.Value, Len(myCell.Value) - 4) Next myCell End Sub HTH, Bernie MS Excel MVP "akkrug" wrote in message ... We need to come up with a way to remove the last 4 characters from the contents of a cell. I tried a macro, but wasn't sure how to make it go to the next cell. For example, I select a cell, press end, backspace 4 positions and then hit enter. Works great for 1 cell! Is there a way to get the macro to repeat all the way down the spreadsheet? As always, Thanks for the help! Ken -- akkrug |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Remove Characters from a cell | Excel Worksheet Functions | |||
how do i display cell contents greater than 255 characters in a t. | Excel Discussion (Misc queries) | |||
how do I display cell contents when I am over 32, 767 characters? | Charts and Charting in Excel | |||
remove last three characters of cell | Excel Discussion (Misc queries) | |||
Macro to remove contents of cell and move all other contents up one row | Excel Discussion (Misc queries) |