# month value

#### sahil

##### Board Regular
if I enter any month in "A1" column than the number of days in that particular month should be in column "B1".

eg: A1 = march 2009, than result in B1 = 31
If A1 = February 2009, than Result in B1 = 28

So on for every month.

Is there any way?

Sahil.......

### Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

#### barry houdini

##### MrExcel MVP
If A1 is custom formatted as mmmm yyyy then when you type in "February 2009" that's what will display but the underlying value will be the 1st of that month

Then in B1 use this formula to get the number of days

=32-DAY(A1+31)

#### sahil

##### Board Regular
Thanx a lot both of you.

either way worked well.

Replies
3
Views
413
Replies
3
Views
359
Replies
0
Views
291
Replies
1
Views
169
Replies
3
Views
242

1,195,749
Messages
6,011,436
Members
441,614
Latest member
TiaGtz

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back