A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Questions about IF Function



 
 
Thread Tools Display Modes
  #1  
Old April 29th, 2004, 03:42 PM
external usenet poster
 
Posts: n/a
Default Questions about IF Function

My workbook contains two worksheets. One of the sheets is
used to query a database and return select columns of
data. The other worksheet is used to organize some of this
information into a report format. I have the following
function in my report worksheet:

=IF(QUERY!B11=" "," ",QUERY!B11)

I have copied this function down to line 100, as this
would be the maximum number of rows returned. My problem
occurs when I try to edit my query. If the new query
returns only 50 rows of data, the following will occur:

-The formula will work fine for rows 11-49.
-I will get the #REF! error on lines 50-99.
-Line 100 will contain the correct data that should reside
on line 50.

I think this may be the weirdest thing that I have seen
Excel do yet, and I was wondering how to correct it so
that the formula will work correctly regardless of how
many rows are returned by the query. Also, WHAT IN THE
HECK would be the logic behind this? Thank you so much for
any suggestions.

  #2  
Old April 29th, 2004, 04:46 PM
Charlie
external usenet poster
 
Posts: n/a
Default Questions about IF Function

Try,

=IF(ISERROR(Query!B11),"",if(Query!B11="","",Query !B11))

Charlie O'Neill
-----Original Message-----
My workbook contains two worksheets. One of the sheets is
used to query a database and return select columns of
data. The other worksheet is used to organize some of

this
information into a report format. I have the following
function in my report worksheet:

=IF(QUERY!B11=" "," ",QUERY!B11)

I have copied this function down to line 100, as this
would be the maximum number of rows returned. My problem
occurs when I try to edit my query. If the new query
returns only 50 rows of data, the following will occur:

-The formula will work fine for rows 11-49.
-I will get the #REF! error on lines 50-99.
-Line 100 will contain the correct data that should

reside
on line 50.

I think this may be the weirdest thing that I have seen
Excel do yet, and I was wondering how to correct it so
that the formula will work correctly regardless of how
many rows are returned by the query. Also, WHAT IN THE
HECK would be the logic behind this? Thank you so much

for
any suggestions.

.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:44 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.