Jesper E Magnussen
asked on
Remove a right side 8 character string from a column of data
Hi,
Have Excel 2016 workbook, With an Entity Volume (here in column "C" sometimes other columns), problem is that the software I got the data from have added string " cubic m" to the values and to sum up the data in the column I need to remove the added string With a click of a button. How do I get round that?
Have Excel 2016 workbook, With an Entity Volume (here in column "C" sometimes other columns), problem is that the software I got the data from have added string " cubic m" to the values and to sum up the data in the column I need to remove the added string With a click of a button. How do I get round that?
Edit Find/Replace (Ctrl+H)
ASKER
Hi thanks,
Would love a bit of VBA code or macro that would do the trick.
Would love a bit of VBA code or macro that would do the trick.
The following VBA code will remove cubic m anywhere on the current worksheet.
Cells.Select
Selection.Replace What:="cubic m", Replacement:="", LookAt:=xlPart
Range("A1").Select
ASKER
Thank's Sam,
What would a Macro that would Call this code look like, to be used in any workbook?
What would a Macro that would Call this code look like, to be used in any workbook?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You probably know this, but just in case, to put Sam's code in a macro the macro would look something like this.
Sub RemoveCubicM
Cells.Select
Selection.Replace What:="cubic m", Replacement:="", LookAt:=xlPart
Range("A1").Select
End Sub