How I can get monthname from the following formula

P

pol

Please let me know to get month name from the following equation

myFormula =
"=Month(IF(LEFT(CELL(""format"",RC[1]),1)=""D"",RC[1],DATE(LEFT(RC[1],4),MID(RC[1],5,2),RIGHT(RC[1],2))))"

With thanks

Pol
 
N

Niek Otten

myFormula =
"=Format((IF(LEFT(CELL(""format"",RC[1]),1)=""D"",RC[1],DATE(LEFT(RC[1],4),MID(RC[1],5,2),RIGHT(RC[1],2))))",""mmmm"")
 
D

David Biddulph

=TEXT(DATE(0,A1,1),"mmmm") if the formula you gave is in A1.
Or just put your formula in place of A1 in the above equation.
 
P

pol

Thanks . But it is not working when I am applying. Syntax error

Niek Otten said:
myFormula =
"=Format((IF(LEFT(CELL(""format"",RC[1]),1)=""D"",RC[1],DATE(LEFT(RC[1],4),MID(RC[1],5,2),RIGHT(RC[1],2))))",""mmmm"")

--
Kind regards,

Niek Otten
Microsoft MVP - Excel


pol said:
Please let me know to get month name from the following equation

myFormula = _
"=Month(IF(LEFT(CELL(""format"",RC[1]),1)=""D"",RC[1],DATE(LEFT(RC[1],4),MID(RC[1],5,2),RIGHT(RC[1],2))))"

With thanks

Pol
 
P

pol

thaks a lot

I applied ur formula in my macro I hope now it is working

David Biddulph said:
=TEXT(DATE(0,A1,1),"mmmm") if the formula you gave is in A1.
Or just put your formula in place of A1 in the above equation.
--
David Biddulph

pol said:
Please let me know to get month name from the following equation

myFormula = _
"=Month(IF(LEFT(CELL(""format"",RC[1]),1)=""D"",RC[1],DATE(LEFT(RC[1],4),MID(RC[1],5,2),RIGHT(RC[1],2))))"

With thanks

Pol
 
Top