display days of a month

sainil

New Member
Joined
Oct 28, 2013
Messages
35
When month name is put in cell A1, dates(in the format of 1,2,3 etc) should be displayed in cell B1 to AF1(ie in the top row). Is there any method, please help.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Try this, copied across...
=DATEVALUE(1&"/"&COLUMN(A1)&"/"&2015)

Format as date
 
Upvote 0
Maybe:
put a date in A1 (now you have a serial number underneath the cell i.e. 1/1/2015 is 42032)
now you need to custum number formatting
open the format cell dailog box and insert just the letter M wich means mounth (be carfull tha you will see 1 but underneath you have 42032 that's the real number that Excel make calculation)
in B1 make this formula =A1+31

<table border="1" cellspacing="0" cellpadding="0" style="font-family:Calibri,Arial; font-size:14pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="width:30px; " /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /><col style="width:37.6px;" /></colgroup><tr style="background-color:#cacaca; text-align:center;font-size:8pt; "><td > </td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">A</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">B</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">C</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">D</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">E</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">F</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">G</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">H</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">I</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">J</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">K</td><td style=" border-width:3px; border-style:solid;border-color:#f0f0f0; ">L</td></tr><tr style="height:21px ;" ><td style="border-width:3; border-style:solid;border-color:#f0f0f0; background-color:#cacaca; text-align:center; " >1</td><td style="text-align:right; ">1</td><td style="text-align:right; ">2</td><td style="text-align:right; ">3</td><td style="text-align:right; ">4</td><td style="text-align:right; ">5</td><td style="text-align:right; ">6</td><td style="text-align:right; ">7</td><td style="text-align:right; ">8</td><td style="text-align:right; ">9</td><td style="text-align:right; ">10</td><td style="text-align:right; ">11</td><td style="text-align:right; ">12</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; border-style: groove ;border-color:#00ff00;background-color:#fffcf9; color:#000000; "><tr><td ><b>Spreadsheet Formulas</b></td></tr><tr><td ><table border = "1" cellspacing="0" cellpadding="2" style="font-family:Arial; font-size:9pt;"><tr style="background-color:#cacaca; font-size:10pt;"><td >Cell</td><td >Formula</td></tr><tr><td >B1</td><td >=+A1+31</td></tr></table></td></tr></table> <br />Excel tables to the web - Excel Jeanie Html 4
 
Upvote 0
@FDibbins
Opppsss!! you are right
english is not my first lenguage...somtimes i miss somethings
Thank you
 
Upvote 0
No problem, we all miss things :)

I just noticed that I had day/month swapped around anyway...
=DATEVALUE(COLUMN(A1)&"/"&$A$1&"/"&2015)

However, if the OP uses my suggestion in B1, modified to...
=DATEVALUE(1&"/"&$A$1&"/"&2015)
Then uses your suggestion for all subsequent cells, we have teh best of both worlds :)
 
Upvote 0
It doesn't work, once again the requirement is, if put January in cell A1, the dates 1,2,3....31 should be displayed in cell B1 to AF1 and if April is put it should display 1,2,3...30 like that. Please help.
 
Upvote 0
Assuming the spelled out month name is in cell A1, put the numbers 1, 2, 3,...,27,28 in cells B1:AC1, then put these formulas in the indicated cells...

AD1: =IF(MONTH(0+(28&A1&YEAR(NOW())))=MONTH(1+(28&A1&YEAR(NOW()))),29,"")

AE1: =IF(AD1="","",AD1+1)

AF1: =IF(ISNUMBER(SEARCH(LEFT(A1,3),"Jan Mar May Jul Aug Oct Dec")),AE1+1,"")
 
Upvote 0
Unfortunately it doesn't work for leap year. Could you modify the formula in AD4 to display 29 for February in a leap year.

thanks
 
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,466
Members
449,086
Latest member
kwindels

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top