A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Setting up and Configuration
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

NEWBIE: Looking for Function to Subract a letter?



 
 
Thread Tools Display Modes
  #1  
Old March 29th, 2004, 05:18 PM
lbbs
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a result
of
CBA. THANKS.


  #2  
Old March 29th, 2004, 05:27 PM
Tom Ogilvy
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

=Right("S.CBA",3)

--
Regards,
Tom Ogilvy

"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.




  #3  
Old March 29th, 2004, 05:27 PM
JulieD
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

Hi

assuming all your data is exactly like the example you can use in cell B1
(for example)
=RIGHT(A1,3)
(assumes data is in A1 - adjust as necessary)
this returns 3 characters from the right
and copy down as many rows as needed

if, however, the length of the string can be longer but always starts with
"S." - which you want to get rid off, you could use this formula:
=RIGHT(A1,LEN(A1)-2)

Let us know how you go

Cheers
JulieD




"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.




  #4  
Old March 29th, 2004, 05:28 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

Hi
try
=SUBSTITUTE(A1,"S.","")
if A1 stores your string value

--
Regards
Frank Kabel
Frankfurt, Germany


lbbs wrote:
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a
result of
CBA. THANKS.


  #5  
Old March 29th, 2004, 05:29 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

=SUBSTITUTE(A1,"S.","")

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.




  #6  
Old March 29th, 2004, 06:39 PM
lbbs
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

To clarify my data is not always in A1 and is not always the same length or
letter.
this is a typical data list, and I always want to get rid of the first 2
characters.

T.CAA
G.CAG
S.VAD
B.DCC

etc...
I want everything after the period.
It would take too long to manually delete the first letter of every cell.



"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.




  #7  
Old March 29th, 2004, 06:42 PM
JulieD
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

Hi

did you try my solution?

Cheers
JulieD

"lbbs" wrote in message
...
To clarify my data is not always in A1 and is not always the same length

or
letter.
this is a typical data list, and I always want to get rid of the first 2
characters.

T.CAA
G.CAG
S.VAD
B.DCC

etc...
I want everything after the period.
It would take too long to manually delete the first letter of every cell.



"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.






  #8  
Old March 29th, 2004, 06:45 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

Hi
put the following formula in the adjacent column 8assumption your data
is in column A)
=MID(A1,FIND(".",A1)+1,1024)
copy this down

After this you may copy this helper column and insert it again as
'Values' to clear the formulas (goto 'Edit - Paste Special' to achieve
this)

--
Regards
Frank Kabel
Frankfurt, Germany

"lbbs" schrieb im Newsbeitrag
...
To clarify my data is not always in A1 and is not always the same

length or
letter.
this is a typical data list, and I always want to get rid of the

first 2
characters.

T.CAA
G.CAG
S.VAD
B.DCC

etc...
I want everything after the period.
It would take too long to manually delete the first letter of every

cell.



"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me

a
result
of
CBA. THANKS.





  #9  
Old March 29th, 2004, 06:51 PM
Bob Phillips
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

It would help if you stated your requirement rather than one example of the
data

=MID(A1,FIND(".",A1)+1,99)

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"lbbs" wrote in message
...
To clarify my data is not always in A1 and is not always the same length

or
letter.
this is a typical data list, and I always want to get rid of the first 2
characters.

T.CAA
G.CAG
S.VAD
B.DCC

etc...
I want everything after the period.
It would take too long to manually delete the first letter of every cell.



"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.






  #10  
Old March 29th, 2004, 07:03 PM
Tom Ogilvy
external usenet poster
 
Posts: n/a
Default NEWBIE: Looking for Function to Subract a letter?

Sub ClearFirstTwo()
Dim rng as Range, cell as Range
set rng = Range(cells(1,1),Cells(1,1).End(xldown))
for each cell in rng
cell.value = Right(cell.value,len(cell.value)-2)
Next
End Sub

This will make the changes in place.

Test it on a copy of your data.

If the spec is any letters to the right of the period

Sub ClearToPeriod()
Dim rng as Range, cell as Range
Dim iloc as Long
set rng = Range(cells(1,1),Cells(1,1).End(xldown))
for each cell in rng
iloc = Instr(1,cell,".",vbTextCompare)
if iloc 0 then
cell.value = Right(cell.value,len(cell.value)-iloc)
end sub
Next
End Sub

--
Regards,
Tom Ogilvy

"lbbs" wrote in message
...
To clarify my data is not always in A1 and is not always the same length

or
letter.
this is a typical data list, and I always want to get rid of the first 2
characters.

T.CAA
G.CAG
S.VAD
B.DCC

etc...
I want everything after the period.
It would take too long to manually delete the first letter of every cell.



"lbbs" wrote in message
...
E.G. S.CBA

looking for a function or macro that will subtract "S." and give me a

result
of
CBA. THANKS.






 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:21 PM.


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