edit values in cells - without ASAP

steallan

Active Member
Joined
Oct 20, 2004
Messages
308
Hi

Anyone tell me a way to edit the data in cells?

I've got various entries and need to delete part of what is entered, but I dont have ASAP utlities installed and no admin rights :(

Delete all after nth character is basically what i'm trying to replicate, or something that would find a specific char and then delete everything after that char, or delete a number of the last char in a cell range etc etc

Replace wont work though, unless there's commands I dont know you can write in

I've got entries like 345-+4 and im trying to get rid of the -+4

Any help would be really great

Thanks

Ste
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
suppose data like this in colmn A from A1 down

Sheet1

*A
1345+-89
2123+-56

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:64px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4

copy mthis data in sheet 2 lso to preserve your original data. you can have more rows.

now try this macro

Code:
Sub test()
Dim r As Range, c As Range
Worksheets("sheet1").Activate
Set r = Range(Range("A1"), Cells(Rows.Count, "A").End(xlUp))
For Each c In r
Dim j As Integer, k As Integer
j = Len(c)
For k = 1 To j
If Not IsNumeric(Mid(c, k, 1)) Then
c = Left(c, k - 1)


GoTo nextc
End If
Next k
nextc:
Next c




End Sub
 
Upvote 0

Forum statistics

Threads
1,214,650
Messages
6,120,734
Members
448,987
Latest member
marion_davis

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