WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

remove and replace a digit...

 
   Home -> Office -> New Users RSS
Next:  print problem font size  
Author Message
Murph

External


Since: Aug 09, 2006
Posts: 13



(Msg. 1) Posted: Mon Feb 04, 2008 12:19 pm
Post subject: remove and replace a digit...
Archived from groups: microsoft>public>excel>newusers (more info?)

I am trying to remove a digit and replace it with another digit.

I.E.: A1 has '2001' in the cell... I want to change that to '9001'.

I have dabbled with =left (a1,3) to remove the '2' but cannot figure out how
to place the 9 in.

Thanks in advance.
Back to top
Login to vote
Gord Dibben

External


Since: Feb 23, 2004
Posts: 8626



(Msg. 2) Posted: Mon Feb 04, 2008 12:38 pm
Post subject: Re: remove and replace a digit... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Try this

=SUBSTITUTE(A1,"2","9")*1

=REPLACE(A10,1,1,"9")*1 which is shorter<g>



Gord Dibben MS Excel MVP


On Mon, 4 Feb 2008 12:19:05 -0800, Murph <Murph.RemoveThis@discussions.microsoft.com>
wrote:

>I am trying to remove a digit and replace it with another digit.
>
>I.E.: A1 has '2001' in the cell... I want to change that to '9001'.
>
>I have dabbled with =left (a1,3) to remove the '2' but cannot figure out how
>to place the 9 in.
>
>Thanks in advance.
Back to top
Login to vote
Ron Rosenfeld

External


Since: Aug 26, 2003
Posts: 2240



(Msg. 3) Posted: Mon Feb 04, 2008 3:56 pm
Post subject: Re: remove and replace a digit... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 4 Feb 2008 12:19:05 -0800, Murph <Murph RemoveThis @discussions.microsoft.com>
wrote:

>I am trying to remove a digit and replace it with another digit.
>
>I.E.: A1 has '2001' in the cell... I want to change that to '9001'.
>
>I have dabbled with =left (a1,3) to remove the '2' but cannot figure out how
>to place the 9 in.
>
>Thanks in advance.

Lots of ways but you don't give enough information.

For example:

=SUBSTITUTE(A1,2,9,1)

will replace the first 2 in a string with a 9.

=REPLACE(A1,1,1,9)

will replace the first character in the string with a 9.

=VLOOKUP(--LEFT(A1,1),$I$1:$J$10,2,FALSE)&MID(A1,2,255)

Can do a variable replace on the first character where the replacement table is
in I1:J10 and looks like:

1 0
2 9
3 8
4 7
5 6
6 5
7 4
8 3
9 2
0 1


So it replaces a number in Column I with the corresponding number in Column J.
--ron
Back to top
Login to vote
Bernard Liengme

External


Since: Jan 27, 2004
Posts: 2246



(Msg. 4) Posted: Mon Feb 04, 2008 4:38 pm
Post subject: Re: remove and replace a digit... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

If you do not want to do math use: =9&RIGHT(A1,3)

--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Murph" <Murph.DeleteThis@discussions.microsoft.com> wrote in message
news:3F5D6C69-CE7F-4155-A741-8613F04E114B@microsoft.com...
>I am trying to remove a digit and replace it with another digit.
>
> I.E.: A1 has '2001' in the cell... I want to change that to '9001'.
>
> I have dabbled with =left (a1,3) to remove the '2' but cannot figure out
> how
> to place the 9 in.
>
> Thanks in advance.
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> New Users All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support