?
Solved

excel if statement print

Posted on 2014-11-25
2
Medium Priority
?
122 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 1200 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 800 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

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

This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
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…
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…

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