Week start date from quickbooks export text range date

B5rocksass

Board Regular
Joined
Jan 10, 2017
Messages
56
Office Version
  1. 2016
Platform
  1. Windows
I have a date question about Quickbook exports into excel. I'm compiling information from that report into a different tab but I'm having issues with the dates. They export as a week range and appear in a text format, for example Jan 22-28, 2017. I'm trying to find a formula that will recognize this as a date and show me the week start date. I've used Transpose, then text to columns to separate by the hyphen and change to MDY format, and then transpose again. There has to be an easier way.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Something that looks like this?

[TABLE="width: 239"]
<tbody>[TR]
[TD]TEXT[/TD]
[TD]DATE[/TD]
[/TR]
[TR]
[TD]Jan 22-28, 2017[/TD]
[TD="align: right"]1/22/17[/TD]
[/TR]
</tbody>[/TABLE]

As long as the year is inconsequential or can be assumed to be the current year, you could just use:

=--LEFT(A2,FIND("-",A2)-1)

Then ensure the format of the cell is a data format.

If you need the year, because you are crossing years, then use:

=--(LEFT(A2,FIND("-",A2)-1)&", "&RIGHT(A5,4))

Probably an easier way to write this, but this works. Double negative turns the result into a number. Make sure you format the cell as a "date".
 
Upvote 0
These both work great...its just that I need it to see last year data as well. So if I have 2016 data and 2017 data, how do I get a formula to recognize which year it is without also having to write in the year above those dates. Or if I have to write in the year above those dates, is there another formula that will extract the year from the text string that I've given? Perhaps a combined formula that does both?
 
Upvote 0

Forum statistics

Threads
1,223,728
Messages
6,174,150
Members
452,548
Latest member
Enice Anaelle

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