Solved

excel if statement print

Posted on 2014-11-25
2
120 Views
Last Modified: 2014-11-25
Hi,

I am trying to use the if statement such that it checks for a condition in column A and returns the date and value in a cell from columns C and D respectively.
The problem is that column C is a date column and column D is a float value. The following line then forms a weird format for the date and combines it with value in column D.

=IF(D8>3,C8&" "&D8,0)

How do I rectify this?

Thanks
Shilpi
0
Comment
Question by:camper12
[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
2 Comments
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 300 total points
ID: 40465718
You'll need to use the TEXT function to format each of the values....

    =IF(D8>3, TEXT(C8, "dd-mmm-yy") & " " & TEXT(D8, "0.00"), 0)

Modify the formats to suit.
0
 
LVL 18

Assisted Solution

by:Simon
Simon earned 200 total points
ID: 40465725
Convert the date column to a text string using your preferred date format

=IF(D8>3,TEXT(C8,"yyyy-mm-dd" & " " & D8,0)

I'm a tiny bit confused because you wrote:
it checks for a condition in column A

... but your formula doesn't refer to column A

Maybe it should be
=IF(A8>3,TEXT(C8,"yyyy-mm-dd" & " " & D8,0)
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
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…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

737 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