Date Formula Help

LearnVBA83

Board Regular
Joined
Dec 1, 2016
Messages
113
Office Version
  1. 365
Platform
  1. Windows
Hi team excel,

I have a column in excel with Month names (Column B) and a column in Excel with years (Column C). Is there a formula that I can use to look at column B and C and return the last day of the month. For example in B2 I have January and in C2 I have 2006 is there a way to enter a formula in column D2 that returns 1/31/2006 in the actual date format?
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try this formula:
Excel Formula:
=EOMONTH(DATEVALUE(B2&" 1, "&C2),0)
 
Upvote 0
I think you can reduce the formula to this:

Book1.xlsx
ABCDE
1
2Jan20221/31/2022
3Feb20232/28/2023
4Mar20243/31/2024
5Apr20254/30/2025
6May20265/31/2026
7Jun20276/30/2027
8Jul20287/31/2028
9Aug20298/31/2029
10Sep20309/30/2030
11Oct203110/31/2031
12Nov203211/30/2032
13Dec203312/31/2033
14January20341/31/2034
15February20352/28/2035
16March20363/31/2036
17April20374/30/2037
18May20385/31/2038
19June20396/30/2039
20July20407/31/2040
21August20418/31/2041
22September20429/30/2042
23October204310/31/2043
24November204411/30/2044
25December204512/31/2045
Sheet3
Cell Formulas
RangeFormula
E2:E25E2=EOMONTH(B2&C2, 0)


Not sure if it would work with any regional format, but I tried UK an US and it worked ok.
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,219
Members
452,619
Latest member
Shiv1198

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