Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 12
Default False Statement won't show

some of my data has - a, - b
i'm using this to pull out the hyphens, but if the statement is false, the
data will not return the original cell if the original cell does not contain
a "-"

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1,cell)

it is, however, pulling the info, minus the ending parts after the "-"
beautifully.
Any ideas?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200806/1

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 202
Default False Statement won't show

You are missing a closing bracket for your Left function

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1),cell)

"spiz via OfficeKB.com" wrote:

some of my data has - a, - b
i'm using this to pull out the hyphens, but if the statement is false, the
data will not return the original cell if the original cell does not contain
a "-"

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1,cell)

it is, however, pulling the info, minus the ending parts after the "-"
beautifully.
Any ideas?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200806/1


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 208
Default False Statement won't show

try this to return the data after the "-"

=IF(ISERROR(FIND("-",A1)),A1,LEFT(A1,FIND("-",A1)-1))


On Jun 20, 9:37 am, "spiz via OfficeKB.com" <u34902@uwe wrote:
some of my data has - a, - b
i'm using this to pull out the hyphens, but if the statement is false, the
data will not return the original cell if the original cell does not contain
a "-"

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1,cell)

it is, however, pulling the info, minus the ending parts after the "-"
beautifully.
Any ideas?

--
Message posted via OfficeKB.comhttp://www.officekb.com/Uwe/Forums.aspx/excel-functions/200806/1


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default False Statement won't show

Assuming the data is TEXT only:

=TRIM(LEFT(A1&"-",FIND("-",A1&"-")-1))

--
Biff
Microsoft Excel MVP


"spiz via OfficeKB.com" <u34902@uwe wrote in message
news:85f54f58fa631@uwe...
some of my data has - a, - b
i'm using this to pull out the hyphens, but if the statement is false, the
data will not return the original cell if the original cell does not
contain
a "-"

=IF(FIND("-",cell),LEFT(cell,FIND("-",cell)-1,cell)

it is, however, pulling the info, minus the ending parts after the "-"
beautifully.
Any ideas?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200806/1



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
Two TRUE to one FALSE statement bluebird Excel Worksheet Functions 4 January 11th 07 04:07 PM
If Statement returns true when false? Eric Excel Discussion (Misc queries) 3 September 11th 06 01:58 PM
If statement that does nothing when false higherlimits Excel Discussion (Misc queries) 1 May 26th 06 06:11 PM
keep cell blank if IF statement is False ruthslaughter New Users to Excel 5 November 25th 05 01:30 PM
keep cell blank when false in IF statement ruthslaughter Excel Discussion (Misc queries) 2 November 22nd 05 06:15 PM


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