Solved

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

Posted on 2013-01-03
7
354 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
  • 3
  • 2
  • 2
7 Comments
 
LVL 50

Assisted Solution

by:teylyn
teylyn 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 23

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

Expert Comment

by:teylyn
ID: 38742469
Now the question for clarification:

Does the cell contain the text "null" or is the cell blank?
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 23

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 23

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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

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 article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
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…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

708 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

12 Experts available now in Live!

Get 1:1 Help Now