Question Locked

Filling in a cell based on another cells date criteria I have dates stored

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have dates stored in cells F5 - G5 - H5 - I5 - J5 - K5 - L5 -
M5 - N5 - O5 - They're stored in the format MM/DD/YY

For example: F5 - 05 Might be:
07/28/08 (MON) 07/29/08(TUE) 07/30/08 (WED) 07/31/08 (THUR) 08/1/08
(FRI) 08/02/08 (SAT) 08/03/08 (SUN) 08/04/08 (MON) 08/05/08 (TUE)
08/06/08 (WED)

The value to populate in the cells below these dates so like F7 for
example is stored in a cell C20 - that value can change...but one
particular value is 10 (this is an hourly rate at which people earn
time)

People can only Earn time at the beginning of the month IF the 1st of the month falls on a Mon-Fri So if the beginning of the month fell on a
Friday...(8/1/08) the Earned time would have to populate the cell below the Friday Date.

If the first of the month fell on a Saturday Then the Earned Time value would populate the cell for the 1st Monday of the month So the formula
would have to take that into account...

Any ideas?

Thanks so much!

2 replies

by Former member

Examples.

1).Excel's LOOKUP functions, or a combined INDEX/MATCH function

2). AutoLinked keywords will cause extra spaces before keywords. Extra spacing is NOT transferred when copy/pasting, but IS if the keyword uses "quotes".
If(A1 = "C1",1,If(A1 = "D1",2,""))

3). Sub Macro1()
'
' Macro1 Macro
Columns("B:B").Select
Selection.ClearContents
Columns("A:A").Select
Selection.Copy
Columns("B:B").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.TextToColumns Destination:= Range("B1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:= Array(1, 1)
Columns("B:B").Select
Selection.Delete Shift:=xlToLeft
Range("B1").Select
Selection.Value = "Ship"
End Sub
http://www.ozgrid.com/forum/showthread.php?t=33682

Please post back if you have any more problems or questions.

This discussion is closed to new replies.