From: pol on
I have three column in my excel sheet

1. Month
2. year
3. Amount
4. Period

In period column, I want to show
1. if the month is current month it should be shown as ' Curnet'
2. If the previous month it should be shown as '30'
3 if before previous month it should be 60
4 otherwise '120'

Please help




From: Stefi on
Try this:
=CHOOSE(DATEDIF(DATE(B2,A2,1),TODAY(),"m")+1,"current","30","60","120")

--
Regards!
Stefi



„pol” ezt írta:

> I have three column in my excel sheet
>
> 1. Month
> 2. year
> 3. Amount
> 4. Period
>
> In period column, I want to show
> 1. if the month is current month it should be shown as ' Curnet'
> 2. If the previous month it should be shown as '30'
> 3 if before previous month it should be 60
> 4 otherwise '120'
>
> Please help
>
>
>
>
From: Bernard Liengme on
Let's say the first row has labels, so A2 holds the first data value for
month
in D2 use
=IF(MONTH(TODAY())=A3,"Current",IF(MONTH(TODAY())-A3=1,30,IF(MONTH(TODAY())-A3=2,60,120)))
This seems to do what you want but be warned: if month is > current month
you get 120
Please give more exact info on what is really needed
best wishes
--
Bernard Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme

"pol" <pol(a)discussions.microsoft.com> wrote in message
news:5FB12E03-BEDB-4B61-A1A9-6C190C26443F(a)microsoft.com...
> I have three column in my excel sheet
>
> 1. Month
> 2. year
> 3. Amount
> 4. Period
>
> In period column, I want to show
> 1. if the month is current month it should be shown as ' Curnet'
> 2. If the previous month it should be shown as '30'
> 3 if before previous month it should be 60
> 4 otherwise '120'
>
> Please help
>
>
>
>