Solved

Excel 2003:  =IF function

Posted on 2011-09-08
5
209 Views
Last Modified: 2012-05-12
Hi EE,

I have to "merge" the data from 2 columns   D2   AND E2  into one column   F2.

If D2 has data, populate F2 with D2's data,  else use E2's data.


In a new column called  F2 have this formula:
     =IF(D2<>" ",D2,E2)


Problem is , if D2 is blank, it's populating F2 with a 0 instead of the data from E2.

Below uploaded a sample...

Thx so much for your help, sandra
EE-ClassGroupings4.xls
0
Comment
Question by:mytfein
5 Comments
 
LVL 24

Accepted Solution

by:
StephenJR earned 125 total points
ID: 36504994
If either D or E will always be full

=IF(D2<>"",D2,E2)
0
 
LVL 12

Assisted Solution

by:telyni19
telyni19 earned 125 total points
ID: 36505075
If D3 can be empty but shouldn't be just a space, try this one:
=IF(LEN(D3)>0,D3,E3)
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 125 total points
ID: 36505302
This accommodates blanks or all spaces, and prevents a 0 result if both D and E are blank:

=if(trim(d2)<>"",d2,e2&"")
0
 
LVL 6

Assisted Solution

by:theKashyap
theKashyap earned 125 total points
ID: 36505318
If D3 can also contain just space(s) then use:
=IF(TRIM(D2)<>"",D2,E2)
or
=IF(LEN(TRIM(D3))>0,D3,E3)

Also see the CLEAN function if applicable.
0
 

Author Comment

by:mytfein
ID: 36505790
Hi Everyone,

Thx so much for writing....

Your ideas solved my problem.... The ideas were similar and yet different....

Below is xls with columns using each of your ideas.....

I learned that:

a)   testing for " "   is different than testing for ""  - if blank, i have to test for ""
b)   can use TRIM, LEN functions
c)   to make a column really blank, append a " " at the end

tx again, s

EE-ClassGroupings4.xls
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now