Thanks, sorry i am not a sound knowledge of VBA, can you pls help me with formula, thanksWelcome to the Boad!
Try this formula in cell A2:
VBA Code:=TEXT(DATEVALUE(A1 &" 1, 2020"),"m")
yes A1 is text Jan, feb, etc. and A2 would be 1 for Jan 2 for Feb etc.Hi,
Are those just the Text January, February, etc. in A1?
Or are they real dates?
And confirm, for January, you want February in B1, all other results should be the corresponding numbers?
yes A1 is text Jan, feb, etc. and A2 would be 1 for Jan 2 for Feb etc.
Book3.xlsx | ||||
---|---|---|---|---|
A | B | |||
1 | January | 1 | ||
2 | February | 2 | ||
3 | March | 3 | ||
4 | April | 4 | ||
5 | May | 5 | ||
6 | June | 6 | ||
7 | July | 7 | ||
8 | August | 8 | ||
9 | September | 9 | ||
10 | October | 10 | ||
11 | November | 11 | ||
12 | December | 12 | ||
Sheet974 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1:B12 | B1 | =MONTH((A1&" 1, 20")+0) |
Book3.xlsx | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | January | February | March | April | May | June | July | August | September | October | November | December | ||
2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | ||
Sheet974 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
A2:L2 | A2 | =MONTH((A1&" 1, 20")+0) |