# Compare Dates To Date Range & Return Date Based On Outcome

#### gusmontoya

##### New Member
Ok
Just to make sure everyone knows. I have been searching Array comparison, vlookup and if statements.
But I can't seem to find anything to help me out.

My problem is that I need to compare three cells of random dates shown in Column E, F,& G with Row's H5:AK5, H7:AK7, H9:AK7 (the Dates to these rows is Static on row H3:AK3.)
EX: ROW 5 has Start Date, End Date (1) and End Date (2). Compare Cell H3 between Start Date & End Date (1). If H3 falls between or equal to Start and End Date(1) then highlight cell H5. Proceed till AK3 (higlighting only the cells H5:AK5). Then compare cell H3 between or equal to End Date (1) and End Date (2) (higlighting only the cells H5:AK5)

Then do the same for ROW 7 and ROW 9.

To make things a bit more difficult I need to have " WK#" in Row 14 (these WK# is on another tab called "Task" of the workbook) needs to be displayed in Row's H4:AK4, H6:AK6, & H8:AK8.
EX: Compare Date in D15 between or equal to Start Date & End Date (1) then display Wk# in D14 in H4. Continue till all dates in
D15:Z15 are compared to Start Date & End Date (1) and WK#'s in Row D14:Z14 are inputted if applicable
in Row H4:AK4, H6:AK6, H8:AK8.
I hope this is not confusing.

">

email: gus.montoya@gmail.com

### Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

#### gusmontoya

##### New Member

Yes I posted on various forums, in hopes to get an answer. I am willing to pay. I need to get this done.

#### barry houdini

##### MrExcel MVP
Can you do this with conditional formatting?

Select H5:AK9 [with H5 "active cell"]

and use Format > Conditional formatting with "formula is" option with 2 conditions

condition 1
=(H\$3>=\$E5)*(H\$3<=\$F5)*(H\$3<>"")
format as required

condition 2
=(H\$3>=\$F5)*(H\$3<=\$G5)*(H\$3<>"")
format as required

Replies
3
Views
341
Replies
2
Views
473
Replies
0
Views
377
Replies
15
Views
2K
Replies
3
Views
931

1,191,054
Messages
5,984,388
Members
439,883
Latest member
onions44

### 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.

### Which adblocker are you using?

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

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