Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default Odd formatting issue

I'm sure this is a no-brainer...

I have a bunch of read-only columns way over on the right of a sheet.
I use formulas to copy that into the visible portion on the left. One
of the formulas is...

=IF(CB20=1,CI20,"")

This works in many cases, but if CI20 is "" (ISBLANK returns TRUE)
then the value is "0". Why is this, and how do I get a blank here
instead?

Maury
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,104
Default Odd formatting issue

=IF(OR(CB20<1,ISBLANK(CI20),"",CI20)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Maury Markowitz" wrote in message
...
I'm sure this is a no-brainer...

I have a bunch of read-only columns way over on the right of a sheet.
I use formulas to copy that into the visible portion on the left. One
of the formulas is...

=IF(CB20=1,CI20,"")

This works in many cases, but if CI20 is "" (ISBLANK returns TRUE)
then the value is "0". Why is this, and how do I get a blank here
instead?

Maury



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Odd formatting issue

try

IF(CB20=1, IF(CI20="","",C120),"")


"Maury Markowitz" wrote in message
...
I'm sure this is a no-brainer...

I have a bunch of read-only columns way over on the right of a sheet.
I use formulas to copy that into the visible portion on the left. One
of the formulas is...

=IF(CB20=1,CI20,"")

This works in many cases, but if CI20 is "" (ISBLANK returns TRUE)
then the value is "0". Why is this, and how do I get a blank here
instead?

Maury


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Odd formatting issue

try

=IF(CB20=1,IF(CI20="","",C120),"")


"Maury Markowitz" wrote in message
...
I'm sure this is a no-brainer...

I have a bunch of read-only columns way over on the right of a sheet.
I use formulas to copy that into the visible portion on the left. One
of the formulas is...

=IF(CB20=1,CI20,"")

This works in many cases, but if CI20 is "" (ISBLANK returns TRUE)
then the value is "0". Why is this, and how do I get a blank here
instead?

Maury


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default Odd formatting issue

I realize I can program around this with a ISBLANK, but there's hundreds of
examples like this and it will be an extremely time consuming and bug-prone
process to find them all.

So my question is really "why is this happening". If I put "=C120" into the
cell then it correctly puts in "". But if I use an IF to select one of the
two values, I get a "0". Is this a side-effect of the IF?

If so, is there some other way to choose between the contents of two cells
that doesn't have this side-effect?

Maury


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Odd formatting issue

interesting - I can't replicate this issue

if I use
=C120 i get whatever is in C120, or nothing if its null
similarly
=IF(C120=1,C120,"")
shows nothing unless C120 contains 1

using Excels 2003 and 2007

"Maury Markowitz" wrote in
message ...
I realize I can program around this with a ISBLANK, but there's hundreds
of
examples like this and it will be an extremely time consuming and
bug-prone
process to find them all.

So my question is really "why is this happening". If I put "=C120" into
the
cell then it correctly puts in "". But if I use an IF to select one of the
two values, I get a "0". Is this a side-effect of the IF?

If so, is there some other way to choose between the contents of two cells
that doesn't have this side-effect?

Maury


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
Formatting issue Kathie Excel Discussion (Misc queries) 2 February 2nd 10 01:11 PM
Formatting Issue Mike Excel Discussion (Misc queries) 3 June 18th 09 12:38 AM
CSV formatting issue sueasmith31 Excel Discussion (Misc queries) 1 May 19th 09 08:00 PM
formatting issue Roger on Excel Excel Programming 1 July 29th 08 10:20 PM
formatting issue scrabtree[_2_] Excel Programming 2 August 5th 04 01:52 PM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"