Solved

Return value from a column unless that value is null, then return value from another column.

Posted on 2013-01-03
7
361 Views
Last Modified: 2013-01-04
This is probably a simple problem but all I need is a formula to return an value from column B unless B is null, then return the value in column A.

Example:

A        B          c
22      20        20 <value to return in C
13      0           0
64     null      64
64     72         72
null   14        14
0
Comment
Question by:swjtx99
[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
  • 3
  • 2
  • 2
7 Comments
 
LVL 50

Assisted Solution

by:Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 250 total points
ID: 38742420
Hello,

maybe this, copied down

=if(B1="null",A1,B1)

If your system uses the semicolon as the list separator, try

=if(B1="null";A1;B1)

cheers, teylyn
0
 
LVL 24

Accepted Solution

by:
Eirman earned 250 total points
ID: 38742436
Use this in column C
=IF(ISBLANK(B1),A1,B1)

The ISBLANK function can be used to check for blank or null values
0
 
LVL 50
ID: 38742469
Now the question for clarification:

Does the cell contain the text "null" or is the cell blank?
0
Independent Software Vendors: 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!

 
LVL 24

Expert Comment

by:Eirman
ID: 38742492
Hi teylyn, I very much doubt that the word 'null' is really there.

I'm fairly sure swjtx99 wants the word null to represent a blank cell
0
 

Author Comment

by:swjtx99
ID: 38742531
Hi,

You are correct Eirman, it's just a blank cell. I specifically go in and do a "clear contents" so I'm sure there is nothing in that cell. My understanding was that would give you a "null" value?

As there was that point of mis-clarity would it be fair to split the points?

Thank you both,

I appreciate the help!

swjtx99
0
 

Author Closing Comment

by:swjtx99
ID: 38742532
Grateful to get the help!
0
 
LVL 24

Expert Comment

by:Eirman
ID: 38743313
Thanks swjtx99.
There are subtle (and confusing) differences between null and blank as this post illustrates ....

http://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_20978027.html
0

Featured Post

Technology Partners: 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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

688 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