Solved

excel if statement print

Posted on 2014-11-25
2
117 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
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.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
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…

777 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