PC Review


Reply
Thread Tools Rate Thread

deleting first 10 characters in a cell

 
 
dstiefe
Guest
Posts: n/a
 
      13th Nov 2009
how do i delete the first 10 characters in a cell? and so there are not 10
spaces in the cell?

Thank you
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      13th Nov 2009
Hi,

You posted in programming so in vb

Range("A1").Value = Mid(Range("a1"), 11)

or as a formula

=RIGHT(A1,MAX(0,LEN(A1)-10))

Mike



"dstiefe" wrote:

> how do i delete the first 10 characters in a cell? and so there are not 10
> spaces in the cell?
>
> Thank you

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      13th Nov 2009
Not a lot of description there about what is actually in the cell). Maybe
this way (assuming you want to do this for the active cell)?

ActiveCell.Value = Trim(Mid(ActiveCell.Value, 11))

--
Rick (MVP - Excel)


"dstiefe" <(E-Mail Removed)> wrote in message
news:0593AE40-2CAC-45B2-B7F0-(E-Mail Removed)...
> how do i delete the first 10 characters in a cell? and so there are not
> 10
> spaces in the cell?
>
> Thank you


 
Reply With Quote
 
OssieMac
Guest
Posts: n/a
 
      13th Nov 2009
Can also use the MID function on the worksheet. However, ensure last
parameter is at least the number of characters to be returned (does not
matter if greater).

=MID(A1,11,255)

Or could use
=MID(A1,11,LEN(A1))
This will always ensure that the last parameter is large enough.

Note: The above formulas cannot be in same cell as source data (in these
examples Cell A1). Need to use another cell (helper column). However, with
Mikes’s VBA solution, the same cell can be manipulated.

--
Regards,

OssieMac


"Mike H" wrote:

> Hi,
>
> You posted in programming so in vb
>
> Range("A1").Value = Mid(Range("a1"), 11)
>
> or as a formula
>
> =RIGHT(A1,MAX(0,LEN(A1)-10))
>
> Mike
>
>
>
> "dstiefe" wrote:
>
> > how do i delete the first 10 characters in a cell? and so there are not 10
> > spaces in the cell?
> >
> > Thank you

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
deleting certain numbers of characters in a cell in a column Erik Microsoft Excel Programming 1 12th Apr 2006 06:21 PM
limiting or deleting extra characters in a cell dprichard Microsoft Excel Misc 3 28th Oct 2005 09:57 PM
Deleting Blank Characters in a Cell PokerZan Microsoft Excel Misc 4 3rd Jun 2005 09:43 PM
Deleting unneeded characters in a cell Wally Steadman Microsoft Excel Programming 1 29th Dec 2004 10:33 PM
deleting the last nine characters in a cell =?Utf-8?B?Q2hyaXM=?= Microsoft Excel Programming 2 18th Jun 2004 04:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:08 AM.