Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Replacing a last digit to something else

Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Replacing a last digit to something else

Sub replacelastchrwithM()
For Each c In Selection
c.Value = Left(c, Len(c) - 1) & "M"
Next c
End Sub

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,173
Default Replacing a last digit to something else

Jen

Use a helper column alongside the current one and a formula (Presume A)

=LEFT(A1,LEN(A1)-1)&"L"

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


wrote in message
ups.com...
Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Replacing a last digit to something else

Thank you! That worked wonderfully. Now, my next question is how to
change only the third digit in a cell to an "L". The number would look
something like 150-123-456. I would want to change the 0 into an "L".
How would I do that? Thanks in advance! Jen

Nick Hodge wrote:
Jen

Use a helper column alongside the current one and a formula (Presume A)

=LEFT(A1,LEN(A1)-1)&"L"

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


wrote in message
ups.com...
Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default Replacing a last digit to something else

=LEFT(A1,2)&"L"&RIGHT(A1,LEN(A1)-3)
--
David Biddulph

wrote in message
ups.com...
Thank you! That worked wonderfully. Now, my next question is how to
change only the third digit in a cell to an "L". The number would look
something like 150-123-456. I would want to change the 0 into an "L".
How would I do that? Thanks in advance! Jen

Nick Hodge wrote:
Jen

Use a helper column alongside the current one and a formula (Presume A)

=LEFT(A1,LEN(A1)-1)&"L"

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


wrote in message
ups.com...
Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen






  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Replacing a last digit to something else

To do with a formula look in the help index for MID

--
Don Guillett
SalesAid Software

wrote in message
ups.com...
Thank you! That worked wonderfully. Now, my next question is how to
change only the third digit in a cell to an "L". The number would look
something like 150-123-456. I would want to change the 0 into an "L".
How would I do that? Thanks in advance! Jen

Nick Hodge wrote:
Jen

Use a helper column alongside the current one and a formula (Presume A)

=LEFT(A1,LEN(A1)-1)&"L"

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


wrote in message
ups.com...
Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen




  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Replacing a last digit to something else

Thank you SOOOO much!! That worked like a charm! I am on Cloud 9! This
makes my work so much easier and faster!! You guys are awesome! I
cannot thank you enough! Jen

David Biddulph wrote:
=LEFT(A1,2)&"L"&RIGHT(A1,LEN(A1)-3)
--
David Biddulph

wrote in message
ups.com...
Thank you! That worked wonderfully. Now, my next question is how to
change only the third digit in a cell to an "L". The number would look
something like 150-123-456. I would want to change the 0 into an "L".
How would I do that? Thanks in advance! Jen

Nick Hodge wrote:
Jen

Use a helper column alongside the current one and a formula (Presume A)

=LEFT(A1,LEN(A1)-1)&"L"

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
www.nickhodge.co.uk


wrote in message
ups.com...
Hi all,

I hope you can help me. I have a huge excel spreadsheet and all I want
to do is replace the last digit in each cell, no matter what it is,
number or letter, into an L or an M. One worksheet will be "L"'s and
one will be "M"'s. My biggest concern is just changing the last digit.
Any ideas? Thank you very much in advance! Jen



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I Calculate Check Digit for UPC A - the 13th warrior AIRJACK Excel Discussion (Misc queries) 6 May 4th 23 07:46 PM
Sorting by 5 digit & 5 digit plus 4 zip codes D Marie Excel Worksheet Functions 1 August 22nd 06 05:17 PM
Replacing last digit with Zero Fish Excel Worksheet Functions 2 January 18th 06 06:05 PM
Return a digit in a string of numbers W M Excel Discussion (Misc queries) 5 May 11th 05 06:51 PM
Tell users how to sort 5 digit and 9 digit zipcodes correctly aft. [email protected] New Users to Excel 1 February 18th 05 12:59 AM


All times are GMT +1. The time now is 05:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"