Solved

excel if statement print

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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 code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

717 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