millera2340
New Member
- Joined
- Aug 10, 2017
- Messages
- 2
Continually getting Run Time Error when attempting to run macro on Excel for Mac...yellow highlighted seems to be issue...
Any suggestions?
' To get dates in mm.dd Format
Range("B3:M3").Select
Selection.Copy
Range("B" & DateRow).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yyyy"
Selection.Replace What:="/", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("P" & DateRow) = 8
Range("Q" & DateRow) = 3
Range("P" & DateRow + 1) = 9
Range("Q" & DateRow + 1) = 4
Range("P" & DateRow + 2) = 10
Range("Q" & DateRow + 2) = 5
Range("B" & DateRow + 1).Activate
ActiveCell.FormulaR1C1 = _
"=LEFT(R[-1]C,VLOOKUP(LEN(R[-1]C),R[-1]C16:R[1]C17,2,FALSE))"
ActiveCell.AutoFill Destination:=Range("B" & DateRow + 1 & ":M" & DateRow + 1), Type:=xlFillDefault
Range("B" & DateRow + 1 & ":M" & DateRow + 1).Copy
Range("B" & DateRow + 1).Activate
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B" & DateRow + 2) = Range("C" & DateRow + 1)
Range("B" & DateRow + 3) = Range("D" & DateRow + 1)
Range("B" & DateRow + 4) = Range("E" & DateRow + 1)
Range("B" & DateRow + 5) = Range("F" & DateRow + 1)
Range("B" & DateRow + 6) = Range("G" & DateRow + 1)
Range("B" & DateRow + 7) = Range("H" & DateRow + 1)
Range("B" & DateRow + 8) = Range("I" & DateRow + 1)
Range("B" & DateRow + 9) = Range("J" & DateRow + 1)
Range("B" & DateRow + 10) = Range("K" & DateRow + 1)
Range("B" & DateRow + 11) = Range("L" & DateRow + 1)
Range("B" & DateRow + 12) = Range("M" & DateRow + 1)
Any suggestions?
' To get dates in mm.dd Format
Range("B3:M3").Select
Selection.Copy
Range("B" & DateRow).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.NumberFormat = "m/d/yyyy"
Selection.Replace What:="/", Replacement:=".", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
Range("P" & DateRow) = 8
Range("Q" & DateRow) = 3
Range("P" & DateRow + 1) = 9
Range("Q" & DateRow + 1) = 4
Range("P" & DateRow + 2) = 10
Range("Q" & DateRow + 2) = 5
Range("B" & DateRow + 1).Activate
ActiveCell.FormulaR1C1 = _
"=LEFT(R[-1]C,VLOOKUP(LEN(R[-1]C),R[-1]C16:R[1]C17,2,FALSE))"
ActiveCell.AutoFill Destination:=Range("B" & DateRow + 1 & ":M" & DateRow + 1), Type:=xlFillDefault
Range("B" & DateRow + 1 & ":M" & DateRow + 1).Copy
Range("B" & DateRow + 1).Activate
ActiveCell.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("B" & DateRow + 2) = Range("C" & DateRow + 1)
Range("B" & DateRow + 3) = Range("D" & DateRow + 1)
Range("B" & DateRow + 4) = Range("E" & DateRow + 1)
Range("B" & DateRow + 5) = Range("F" & DateRow + 1)
Range("B" & DateRow + 6) = Range("G" & DateRow + 1)
Range("B" & DateRow + 7) = Range("H" & DateRow + 1)
Range("B" & DateRow + 8) = Range("I" & DateRow + 1)
Range("B" & DateRow + 9) = Range("J" & DateRow + 1)
Range("B" & DateRow + 10) = Range("K" & DateRow + 1)
Range("B" & DateRow + 11) = Range("L" & DateRow + 1)
Range("B" & DateRow + 12) = Range("M" & DateRow + 1)