How do I make a conditional using just using the date MONTH and from it insert a formula into a certain cell?

Asked

Viewed 51 times

0

I’m optimizing a spreadsheet, but this formula is not working =SE($A2="/01/";$S2="=MÊS($A2)";"errado"). I would like the formula to do the following, case in the cell A2 contain the month of January (regardless of day and year) insert into the cell S2 the formula =MÊS(A2), case of wrong insert ERRADO, but in the cell A2 of my spreadsheet contains the date 12/01/2018, but it is returning in the cell S2 the value "WRONG".

1 answer

0

Your syntax of the formula =SE() is wrong.

Insert the following formula into S2:

=SE($A2="";"";SE(MÊS($A2)=1;TEXTO(MÊS($A2);"mmmm");"errado"))

The function =MÊS() returns the month of a date in numeric format, so it is necessary to convert the month into text with the function =TEXTO().

And when the cell is empty, Excel understands that it is January, so it is necessary to add a conditional to check if the cell A2 is empty.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.