Solved

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

Posted on 2013-01-03
7
355 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:Ingeborg Hawighorst
Ingeborg Hawighorst 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:Ingeborg Hawighorst
ID: 38742469
Now the question for clarification:

Does the cell contain the text "null" or is the cell blank?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
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…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

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