Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Can I use an "If, then" function here...

I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Can I use an "If, then" function here...

Try the below formula in B1 with your entry in A1.

=RIGHT(A1,IF(LEFT(A1,1)="R",5,4))

If this post helps click Yes
---------------
Jacob Skaria


"jkramos2005" wrote:

I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 915
Default Can I use an "If, then" function here...

jkramos2005 wrote:
I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!


Assuming you want everything after the first dot,

=MID(A1,FIND(".",A1)+1,99)
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Can I use an "If, then" function here...

If the number of numerics after the dot is not fixed; and if the text string
always contain only one dot. you can use this..which will extract the
characters after the first dot.

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

If this post helps click Yes
---------------
Jacob Skaria


"jkramos2005" wrote:

I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 120
Default Can I use an "If, then" function here...

one way

=MID(SUBSTITUTE(A1,"r",""),5,5)
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another



"jkramos2005" wrote:

I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 120
Default Can I use an "If, then" function here...

Hi

This is a more robust formula
--
Hope this is helpful

Pls click the Yes button below if this post provide answer you have asked

Thank You

cheers, francis

Am not a greek but an ordinary user trying to assist another



"Jacob Skaria" wrote:

If the number of numerics after the dot is not fixed; and if the text string
always contain only one dot. you can use this..which will extract the
characters after the first dot.

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

If this post helps click Yes
---------------
Jacob Skaria


"jkramos2005" wrote:

I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Can I use an "If, then" function here...

Hi,

If there is just one decimal and you want to extract all characters after
the decimal, then you can use this

=TRIM(RIGHT(SUBSTITUTE(B4,".",REPT(" ",20)),10)), where B4 holds the string

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"jkramos2005" wrote in message
...
I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
OKY OKY is offline
external usenet poster
 
Posts: 7
Default Can I use an "If, then" function here...

Hi Jacb.
I saw your post and I think I need your help with a similar situation.
I have a sheet, where I have
Technician# Job# TIME STATUS
Peter 1R 8-11am CP
2R 8-11am
Mike 5R 2-4pm CP
7R 2-5pm
11R 8-11am
I need to create sort of a report that will display only the jobs where the
STATUS is blank. Example:
TECH TIME JOB#
Peter 2-4pm 2R
Mike 2-5pm 7R
8-11am 11R
Could you help me with this situation?
Please be very specific in the procedure, Im not expert.

Thank You..
"Jacob Skaria" wrote:

Try the below formula in B1 with your entry in A1.

=RIGHT(A1,IF(LEFT(A1,1)="R",5,4))

If this post helps click Yes
---------------
Jacob Skaria


"jkramos2005" wrote:

I have a range of accounts:

022.9700
000.4500
001.9600
r100.R9500


For those with no "r" I want to use a function of:

=right(cell location, count four characters from the right)


So for the first line the value returned would be:

9700

But for the fourth line I would like the value returned to be:

R9500

How would I adjust my formula so that I just use one formula for the whole
range of data?

Any help would be most appreciated.

Thanks!

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
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 05:23 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"