Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Formula error

Hi

I cannot get this formula to work:

=IF(ISERR(-TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN",IF(and(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))=35,(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))<=1859),VALUE(TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN"))

when I put it into a cell it just shows up as text.

I formatted the cell as General and still nothing

The formula auditor says it is a constant.

the formula is supposed to take text like this:

BGN/17/48

and return the number after the last / character

can anyone help ?

J
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Formula error

After you format as General, try pressing F2 and then Enter.

HTH,
Paul

--

"ScoobyDoo" wrote in message
...
Hi

I cannot get this formula to work:

=IF(ISERR(-TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN",IF(and(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))=35,(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))<=1859),VALUE(TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN"))

when I put it into a cell it just shows up as text.

I formatted the cell as General and still nothing

The formula auditor says it is a constant.

the formula is supposed to take text like this:

BGN/17/48

and return the number after the last / character

can anyone help ?

J



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula error

Does this array-entered** formula do what you are attempting to do with the
formula you posted?

=IF(ISNUMBER(-FIND("/",A1)),MID(A1,MAX((MID(A1,ROW($1:99),1)="/")*ROW($1:99))+1,99),"")

** Commit this formula using Ctrl+Shift+Enter, not just Enter by itself.

Rick


"ScoobyDoo" wrote in message
...
Hi

I cannot get this formula to work:

=IF(ISERR(-TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN",IF(and(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))=35,(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))<=1859),VALUE(TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN"))

when I put it into a cell it just shows up as text.

I formatted the cell as General and still nothing

The formula auditor says it is a constant.

the formula is supposed to take text like this:

BGN/17/48

and return the number after the last / character

can anyone help ?

J


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Formula error

On Jul 10, 6:03*pm, "PCLIVE" wrote:
After you format as General, try pressing F2 and then Enter.

HTH,
Paul

--

"ScoobyDoo" wrote in message

...



Hi


I cannot get this formula to work:


=IF(ISERR(-TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN",IF(and(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))=35,(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))<=1859),VALUE(TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN"))


when I put it into a cell it just shows up as text.


I formatted the cell as General and still nothing


The formula auditor says it is a constant.


the formula is supposed to take text like this:


BGN/17/48


and return the number after the last / character


can anyone help ?


J- Hide quoted text -


- Show quoted text -


Thanks... Got it working
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formula error

For the archives....

I omitted some absolute references that are necessary if the formula ever
needs to be copied down...

=IF(ISNUMBER(-FIND("/",A1)),MID(A1,MAX((MID(A1,ROW($1:$99),1)="/")*ROW($1:$99))+1,99),"")

However, here is normally entered formula that produces the same results...

=IF(ISNUMBER(-FIND("/",A1)),TRIM(SUBSTITUTE(RIGHT(SUBSTITUTE(A1,"/",REPT("/",99)),99),"/","
")),"")

Rick


"Rick Rothstein (MVP - VB)" wrote in
message ...
Does this array-entered** formula do what you are attempting to do with
the formula you posted?

=IF(ISNUMBER(-FIND("/",A1)),MID(A1,MAX((MID(A1,ROW($1:99),1)="/")*ROW($1:99))+1,99),"")

** Commit this formula using Ctrl+Shift+Enter, not just Enter by itself.

Rick


"ScoobyDoo" wrote in message
...
Hi

I cannot get this formula to work:

=IF(ISERR(-TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN",IF(and(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))=35,(--TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))<=1859),VALUE(TRIM(RIGHT(SUBSTITUTE(H2,"/",REPT(" ",100)),
100))),"UNKNOWN"))

when I put it into a cell it just shows up as text.

I formatted the cell as General and still nothing

The formula auditor says it is a constant.

the formula is supposed to take text like this:

BGN/17/48

and return the number after the last / character

can anyone help ?

J



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
IF formula returns error; abbreviating the formula MZ Excel Discussion (Misc queries) 4 January 7th 10 11:02 PM
Formula Error-Error Message Paige Excel Programming 2 July 25th 06 09:11 PM
Formula expected end of statement error, typing formula into cell as part of VBA macro [email protected] Excel Programming 1 July 20th 06 07:58 PM
How do I replace "#N/A" error, to continue my formula w/o error? Ali Khan Excel Worksheet Functions 2 February 20th 06 03:49 PM
Formula error with Mac resulting in '#NAME' error Linking to specific cells in pivot table Excel Programming 2 August 1st 05 07:13 AM


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