Hello -
I have the following code working, but I am having to select each cell F-M individually. I want to be able to compress this code.
Select the current row columns F-M then set the NumberFormat and HorizontalAlignment...
I know this code is probably a laughing matter to some, but I don't know how to select the current row in this code...
I have tried all combinations of Range, Offset, etc.
Again the code works, but I would like to stream line the first 16 lines because I need to format other items in the sheet and I know this is not the most efficient way.
Thanks as always in advance....
I have the following code working, but I am having to select each cell F-M individually. I want to be able to compress this code.
Select the current row columns F-M then set the NumberFormat and HorizontalAlignment...
I know this code is probably a laughing matter to some, but I don't know how to select the current row in this code...
I have tried all combinations of Range, Offset, etc.
Again the code works, but I would like to stream line the first 16 lines because I need to format other items in the sheet and I know this is not the most efficient way.
Thanks as always in advance....
Code:
wsDest.Range("F" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("F" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("G" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("G" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("H" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("H" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("I" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("I" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("J" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("J" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("K" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("K" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("L" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("L" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
wsDest.Range("M" & Rows.Count).End(xlUp).Offset(1).NumberFormat = "0"
wsDest.Range("M" & Rows.Count).End(xlUp).Offset(1).HorizontalAlignment = xlRight
' Write Info
wsDest.Range("F" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("C34").Value
wsDest.Range("G" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("D34").Value
wsDest.Range("H" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("E34").Value
wsDest.Range("I" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("F34").Value
' Write Information
wsDest.Range("J" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("C33").Value
wsDest.Range("K" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("D33").Value
wsDest.Range("L" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("E33").Value
wsDest.Range("M" & Rows.Count).End(xlUp).Offset(1).Value = ws.Range("F33").Value