Solved

excel if statement print

Posted on 2014-11-25
2
113 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:SimonAdept
SimonAdept 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
EXCEL Addin problem 7 26
onOpen 14 42
Add macros on Open 9 32
Formula to convert ranked data 2 11
Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Viewers will learn the basics of slicers and timelines for both PivotTables and standard Excel tables in Excel 2013.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

762 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now