?
Solved

Excel 2003:  =IF function

Posted on 2011-09-08
5
Medium Priority
?
221 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 24

Accepted Solution

by:
StephenJR earned 500 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 500 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 93

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 500 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 500 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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