Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Location: India
Posts: 11
Default Excel Logical function

I am trying use the nested IF function to do the following steps:
To make clear in Cell M2, I would have the project deadline date in mm/dd/yyyy format.
I want the following condition to be satisfied.
1. IF date is greater than or equal to 15 than the same month should be in Y2
2. IF date is less than 15 than the earlier month should be returned back in Y2
3. If the M2 is blank than it should return a blank Cell in Y2

So this seems a multiple if condition, got bit confusing so what i did is used
=IF(M20,DAY(M2), "") which returns the date from reference cell.
and used
=IF(X2=15,TEXT(M2,"MMM"), IF(X2<15,EOMONTH(M2,-1), IF(X2="","",""))) to return the all the above condition, all works fine but when X2 is blank, then it returns JAN as month instead of blank cell can somebody help.
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Rajesh Bhapkar View Post
I am trying use the nested IF function to do the following steps:
To make clear in Cell M2, I would have the project deadline date in mm/dd/yyyy format.
I want the following condition to be satisfied.
1. IF date is greater than or equal to 15 than the same month should be in Y2
2. IF date is less than 15 than the earlier month should be returned back in Y2
3. If the M2 is blank than it should return a blank Cell in Y2

So this seems a multiple if condition, got bit confusing so what i did is used
=IF(M20,DAY(M2), "") which returns the date from reference cell.
and used
=IF(X2=15,TEXT(M2,"MMM"), IF(X2<15,EOMONTH(M2,-1), IF(X2="","",""))) to return the all the above condition, all works fine but when X2 is blank, then it returns JAN as month instead of blank cell can somebody help.
Put the IF(X2="","" section at the start of the formula and all should work out.
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 74
Default Excel Logical function

Rajesh Bhapkar used his keyboard to write :
I am trying use the nested IF function to do the following steps:
To make clear in Cell M2, I would have the project deadline date in
mm/dd/yyyy format.
I want the following condition to be satisfied.
1. IF date is greater than or equal to 15 than the same month should be
in Y2
2. IF date is less than 15 than the earlier month should be returned
back in Y2
3. If the M2 is blank than it should return a blank Cell in Y2

So this seems a multiple if condition, got bit confusing so what i did
is used
=IF(M20,DAY(M2), "") which returns the date from reference cell.
and used
=IF(X2=15,TEXT(M2,"MMM"), IF(X2<15,EOMONTH(M2,-1), IF(X2="","",""))) to
return the all the above condition, all works fine but when X2 is blank,
then it returns JAN as month instead of blank cell can somebody help.


Try this:

=IF(X2="","",IF(X2=15,TEXT(M2,"MMM"),IF(X2<15,EOM ONTH(M2,-1))))

Bruno


  #4   Report Post  
Junior Member
 
Location: India
Posts: 11
Smile

Quote:
Originally Posted by Spencer101 View Post
Put the IF(X2="","" section at the start of the formula and all should work out.
Thank you for your help,

It worked...
  #5   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Rajesh Bhapkar View Post
Thank you for your help,

It worked...
Not a problem! Glad to help :)


  #6   Report Post  
Junior Member
 
Location: India
Posts: 11
Unhappy

Quote:
Originally Posted by Spencer101 View Post
Put the IF(X2="","" section at the start of the formula and all should work out.
Could you please help me with one more thing..

As per the conditions provided, The EOMONTH(M2,-1) returns me a numerical value, i have formatted these cells to display it as 'mmm', so it shows me as Apr when the deadline date is 05/03/2012 (mm/dd/yyyy). But when i created a pivot table to check the workload per person in an individual month these cells were not considered under the same month but displayed as date separately, which is invalid date, So in pivot table formatted the cells to get MMM, but they are as separate columns.... Could you please help me
  #7   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Rajesh Bhapkar View Post
Could you please help me with one more thing..

As per the conditions provided, The EOMONTH(M2,-1) returns me a numerical value, i have formatted these cells to display it as 'mmm', so it shows me as Apr when the deadline date is 05/03/2012 (mm/dd/yyyy). But when i created a pivot table to check the workload per person in an individual month these cells were not considered under the same month but displayed as date separately, which is invalid date, So in pivot table formatted the cells to get MMM, but they are as separate columns.... Could you please help me
To help with that you will have to post an example workbook so we can have a look at where it's going wrong and help fix it.
  #8   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Rajesh Bhapkar View Post
Could you please help me with one more thing..

As per the conditions provided, The EOMONTH(M2,-1) returns me a numerical value, i have formatted these cells to display it as 'mmm', so it shows me as Apr when the deadline date is 05/03/2012 (mm/dd/yyyy). But when i created a pivot table to check the workload per person in an individual month these cells were not considered under the same month but displayed as date separately, which is invalid date, So in pivot table formatted the cells to get MMM, but they are as separate columns.... Could you please help me
Does this solve it?

=IF(X2="","",IF(X2=15,TEXT(M2,"MMM"),IF(X2<15,TEXT(EOMONTH(M2,-1),"MMM"))))
  #9   Report Post  
Junior Member
 
Location: India
Posts: 11
Unhappy

Quote:
Originally Posted by Spencer101 View Post
To help with that you will have to post an example workbook so we can have a look at where it's going wrong and help fix it.
Here's the example workbook, that is similar to the one i am working with.
Attached Files
File Type: zip Book2.zip (14.1 KB, 31 views)
  #10   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Rajesh Bhapkar View Post
Here's the example workbook, that is similar to the one i am working with.
Try putting the below formula in F2 on Sheet1 and copying down.

=IF(E2="","",IF(E2=15,TEXT(D2,"MMM"),TEXT(EOMONTH (D2,-1),"MMM")))

Then refresh the pivot table and I THINK that does what you need.


  #11   Report Post  
Junior Member
 
Location: India
Posts: 11
Smile

Quote:
Originally Posted by Spencer101 View Post
Try putting the below formula in F2 on Sheet1 and copying down.

=IF(E2="","",IF(E2=15,TEXT(D2,"MMM"),TEXT(EOMONTH (D2,-1),"MMM")))

Then refresh the pivot table and I THINK that does what you need.
Yippe, Thanks, well i was trying with the formula from 2 days and messed it up... Only shifting and 3M's directed it to the condition.... Thank you spencer... Thank you very very much...
  #12   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by Rajesh Bhapkar View Post
Yippe, Thanks, well i was trying with the formula from 2 days and messed it up... Only shifting and 3M's directed it to the condition.... Thank you spencer... Thank you very very much...
Not a problem Rajesh. Always happy to help. :)
  #13   Report Post  
Junior Member
 
Location: India
Posts: 11
Exclamation

Quote:
Originally Posted by Spencer101 View Post
Not a problem Rajesh. Always happy to help. :)
Back again with a question with excel formula, The earlier formula was used to create a pivot table, which now is successfully created, but from that pivot table i want to create a comprehensive table which gives total of workload per person irrespective of team, i tried to create an another pivot table from the first one but one cell in header is blank, it is not feasible. So i decided to list down the names of person in table 2, but the problem i cannot figure out feasible way to get an automatic update to return me the sums of above also the header should be repeated with out the team/group name.
Enclosing herewith an example sheet... I know this might be frustrating but please do help....
Attached Files
File Type: zip Book2.zip (15.0 KB, 75 views)
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 Logical IF function Stuck! Excel Worksheet Functions 2 March 20th 10 09:26 AM
Logical Function excel 2003 Denver Excel Worksheet Functions 4 June 30th 09 07:01 PM
Help!!! - logical function for someone not very logical ECH123 Excel Worksheet Functions 3 May 11th 09 04:14 PM
EXCEL 2000 - IF function returns wrong result from logical test Sean Duffy Excel Worksheet Functions 8 October 15th 08 09:58 PM
Help with logical function PT New Users to Excel 2 February 22nd 08 02:13 AM


All times are GMT +1. The time now is 03:02 AM.

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

About Us

"It's about Microsoft Excel"