Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gee...
 
Posts: n/a
Default If it's not a space, return the cell contents.

I have a column of data that's generated when some tests are done.
There are "File" names, then any number of "Page" names.
All the Page names start with 5 spaces (space-bar hits).
I would like an if/then function that would look at the first character and
if it's not a space to return the contents of the cell.
Like if the cell says " A23 " I would get a return of "" (nothing).
If the cell says "BC55HTM" I would get a return of "BC55HTM"


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Govind
 
Posts: n/a
Default If it's not a space, return the cell contents.

Hi,

Use

=IF(LEFT(A1,1)=" ","",A1)

Regards

Govind.

Gee... wrote:

I have a column of data that's generated when some tests are done.
There are "File" names, then any number of "Page" names.
All the Page names start with 5 spaces (space-bar hits).
I would like an if/then function that would look at the first character and
if it's not a space to return the contents of the cell.
Like if the cell says " A23 " I would get a return of "" (nothing).
If the cell says "BC55HTM" I would get a return of "BC55HTM"


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default If it's not a space, return the cell contents.

Hi!

Try this:

=IF(LEFT(A1)=" ","",A1)

Or

=IF(LEFT(A1)=CHAR(32),"",A1)

Biff

"Gee..." wrote in message
...
I have a column of data that's generated when some tests are done.
There are "File" names, then any number of "Page" names.
All the Page names start with 5 spaces (space-bar hits).
I would like an if/then function that would look at the first character
and
if it's not a space to return the contents of the cell.
Like if the cell says " A23 " I would get a return of ""
(nothing).
If the cell says "BC55HTM" I would get a return of "BC55HTM"




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gee...
 
Posts: n/a
Default If it's not a space, return the cell contents.

Thanks, guys...just what I needed!

"Gee..." wrote:

I have a column of data that's generated when some tests are done.
There are "File" names, then any number of "Page" names.
All the Page names start with 5 spaces (space-bar hits).
I would like an if/then function that would look at the first character and
if it's not a space to return the contents of the cell.
Like if the cell says " A23 " I would get a return of "" (nothing).
If the cell says "BC55HTM" I would get a return of "BC55HTM"


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
Select cell, Copy it, Paste it, Return to Previous cell spydor Excel Discussion (Misc queries) 1 December 30th 05 01:29 PM
Don't allow a space in a cell...how to prevent? Jugglertwo Excel Discussion (Misc queries) 2 December 2nd 05 04:50 PM
Getting contents of a cell when cell reference is in the sheet A Nelson Excel Discussion (Misc queries) 3 October 5th 05 06:46 PM
How do I clear the contents of one cell from another cell? RonB Excel Worksheet Functions 1 September 26th 05 07:33 PM
return a blank cell jpotts8117 Excel Worksheet Functions 5 September 23rd 05 08:33 PM


All times are GMT +1. The time now is 08:18 AM.

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"