Pull in the last day of the year based on text

FredFlamingo

New Member
Joined
Apr 24, 2020
Messages
8
Platform
  1. Windows
Hi all,

I need help with a formula, I need it to pull in the last day of the year when it looks up to a certain string of text... e.g. if it says ABC Ltd or ABC LTD International i want it to pull in 12/31/2020 otherwise any other company name it will pull in today's date. i know there is an EOmonth Formula which pulls in the end of the month but there doesn't appear to be the equivalent for end of year. i have pasted the formula i have so far below (i have removed pathways and names of files)

=IFERROR(IF(VLOOKUP(C2,.xlsx]FILE NAME'!$A:$E,5,FALSE)=("ABC Ltd"),(EOMONTH(TODAY(),0)),IF(VLOOKUP(C2,.xlsx]FILE NAME'!$A:$E,5,FALSE)=("ABC LTD International"),(EOMONTH(TODAY(),0)),(TODAY()))),TODAY())
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Perhaps the date function can help you. DATE(YEAR(TODAY()),12,31)
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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