ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Using arrays or range in IF function - HELP PLS (https://www.excelbanter.com/excel-worksheet-functions/70909-using-arrays-range-if-function-help-pls.html)

MickJJ

Using arrays or range in IF function - HELP PLS
 
I have a workbook with 2 worksheets. Wksht 1 = Checklist, Wksht 2 = Completion.

In cloumn A (Wksht1) I have a list of Y or N for range A2:A14 and column B
is a range of Items. eg:

COL A COL B
Y LOCAL
Y HIGHWAYS
N MINING
Y DRAINAGE

In column A (wrksht 2) I have the following formula:

=IF(Checklist!A2= "Y",Checklist!B2," ")
I then copied this down the column to othe rows

Where the logical test is true I do get the correct value from col B
but if the logical test is false then I just get a blank line.

How do I get rid of the blanklines and end up with just the 'true' values.

Bernard Liengme

Using arrays or range in IF function - HELP PLS
 
You could take the result (with blank rows), use Copy followed by Paste
Special-Values to change formulas to values. Then use Sort.
Without knowing more of the purpose I cannot make any suggestion
best wishes

--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"MickJJ" wrote in message
...
I have a workbook with 2 worksheets. Wksht 1 = Checklist, Wksht 2 =
Completion.

In cloumn A (Wksht1) I have a list of Y or N for range A2:A14 and column B
is a range of Items. eg:

COL A COL B
Y LOCAL
Y HIGHWAYS
N MINING
Y DRAINAGE

In column A (wrksht 2) I have the following formula:

=IF(Checklist!A2= "Y",Checklist!B2," ")
I then copied this down the column to othe rows

Where the logical test is true I do get the correct value from col B
but if the logical test is false then I just get a blank line.

How do I get rid of the blanklines and end up with just the 'true' values.





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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com