Excel formula

Suman Das

New Member
Joined
Apr 17, 2013
Messages
4
Hi, i want to crate a formulla where if A1 if January A2 will be February, if A1 is February A2 will be 2 , A1 if Mar A2 will be 3, if A1 is Apr A2 will be 4, pls help me to create.
Thanks in adance.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Welcome to the Boad!

Try this formula in cell A2:
VBA Code:
=TEXT(DATEVALUE(A1 &" 1, 2020"),"m")
 
Upvote 0
Solution
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?
 
Upvote 0
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.
 
Upvote 0
Another option, similar to Joe's
+Fluff 1.xlsm
A
1Feb
22
Main
Cell Formulas
RangeFormula
A2A2=TEXT(DATEVALUE("1/"&A1),"m")
 
Upvote 0
Thanks, sorry i am not a sound knowledge of VBA, can you pls help me with formula, thanks
??? It isn't VBA at all. It is just a fomula.
Just copy and paste into cell A2.
 
Upvote 0
yes A1 is text Jan, feb, etc. and A2 would be 1 for Jan 2 for Feb etc.

Then try this, result is a real number:

Book3.xlsx
AB
1January1
2February2
3March3
4April4
5May5
6June6
7July7
8August8
9September9
10October10
11November11
12December12
Sheet974
Cell Formulas
RangeFormula
B1:B12B1=MONTH((A1&" 1, 20")+0)


For horizontal configuration:

Book3.xlsx
ABCDEFGHIJKL
1JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember
2123456789101112
Sheet974
Cell Formulas
RangeFormula
A2:L2A2=MONTH((A1&" 1, 20")+0)
 
Upvote 0

Forum statistics

Threads
1,214,835
Messages
6,121,880
Members
449,057
Latest member
Moo4247

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