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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|