#1   Report Post  
LizJ
 
Posts: n/a
Default Cell formatting

Hi, I have used lookup to return dates that I then want to use an IF function
to see whether the data matches. I have taken the data from two sources, one
gives me just the month, and the other provides the date in dd/mm/yyyy
format. What I want to know is when the month is the same. I have formatted
the dd/mm/yyyy cell to show the month, however, the underlying data is still
dd/mm/yyyy so when I use the if function I get an incorrect result. Is there
a way I can do this.

e.g.
Column A Column B
October October, but data is 30/10/2004
September June but data is 30/06/2004

In column C, I want to return whether the months are the same or not. Thanks
  #2   Report Post  
Max
 
Posts: n/a
Default

Column A Column B
October October, but data is 30/10/2004
September June but data is 30/06/2004


One way

Try something along these lines in col C

In C2:

=IF(TEXT(B2,"mmmm")=A2,"Value_if_TRUE","Value_if_F ALSE")

Copy down
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"LizJ" wrote in message
...
Hi, I have used lookup to return dates that I then want to use an IF

function
to see whether the data matches. I have taken the data from two sources,

one
gives me just the month, and the other provides the date in dd/mm/yyyy
format. What I want to know is when the month is the same. I have

formatted
the dd/mm/yyyy cell to show the month, however, the underlying data is

still
dd/mm/yyyy so when I use the if function I get an incorrect result. Is

there
a way I can do this.

e.g.
Column A Column B
October October, but data is 30/10/2004
September June but data is 30/06/2004

In column C, I want to return whether the months are the same or not.

Thanks


  #3   Report Post  
LizJ
 
Posts: n/a
Default

That seems to have worked a treat, thanks Max

"Max" wrote:

Column A Column B
October October, but data is 30/10/2004
September June but data is 30/06/2004


One way

Try something along these lines in col C

In C2:

=IF(TEXT(B2,"mmmm")=A2,"Value_if_TRUE","Value_if_F ALSE")

Copy down
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"LizJ" wrote in message
...
Hi, I have used lookup to return dates that I then want to use an IF

function
to see whether the data matches. I have taken the data from two sources,

one
gives me just the month, and the other provides the date in dd/mm/yyyy
format. What I want to know is when the month is the same. I have

formatted
the dd/mm/yyyy cell to show the month, however, the underlying data is

still
dd/mm/yyyy so when I use the if function I get an incorrect result. Is

there
a way I can do this.

e.g.
Column A Column B
October October, but data is 30/10/2004
September June but data is 30/06/2004

In column C, I want to return whether the months are the same or not.

Thanks



  #4   Report Post  
Max
 
Posts: n/a
Default

Glad to hear that !
Thanks for the feedback
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----

LizJ wrote in message
...
That seems to have worked a treat, thanks Max




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel formatting of text-- one cell needed Jonathan Graham Excel Discussion (Misc queries) 1 December 17th 04 03:56 PM
Cell Formatting jmaulsby Excel Discussion (Misc queries) 1 December 9th 04 03:25 PM
Formatting a cell as "text" in the number catagory. Ed Excel Worksheet Functions 3 December 7th 04 07:12 PM
conditional formatting blank cell TREK5200 Excel Discussion (Misc queries) 1 December 6th 04 02:23 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 05:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"