Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel 2003:  =IF function

Posted on 2011-09-08
5
Medium Priority
?
226 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
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…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

604 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