nested if statements

suzyt1374

New Member
Joined
Sep 1, 2017
Messages
3
I am trying to write a formula that will look at a date in column H2 and determine if that date is a prior week, week 1 or week 2

For example anything older than or equal to 8/19/17 is prior, any date between 8/20-8/26 is week 1, and any date between 8/27-9/2 is week 2.

I have it already done to isolate week 1 or week 2 but need to capture prior week. This is what I have to build off of, any help would be appreciated.

=IF(H2<=DATEVALUE("08/26/17"),"week 1","week 2")

there will be all different dates in column h2 ranging back a over a month or more in some cases.
 
IF(H2<today()-6-weekday(today(),1),"prior week",
<

TODAY()-6-WEEKDAY(TODAY(),1),"Prior week",
<today()-6-weekday(today(),1),"prior week",

IF(AND(H2>=TODAY()-6-WEEKDAY(TODAY(),1),H2<=TODAY()-WEEKDAY(TODAY(),1)),"Week 1",

IF(AND(H2>=TODAY()+1-WEEKDAY(TODAY(),1),H2<=TODAY()+7-WEEKDAY(TODAY(),1)),"Week 2")))</today()-6-weekday(today(),1),"prior></today()-6-weekday(today(),1),"prior>
 
Upvote 0

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Looks like you are still having issues.
Be sure to place the spaces both BEFORE and AFTER your < and > signs.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,323
Members
452,635
Latest member
laura12345

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