Hi
looking for some help with formatting cells.
I currently have a spreadsheet that automatically populates depending on a value that is in a certain cell (target address).
The information (target range) is pulled from another sheet ( Sheet 25) and then dropped into the named area I need ("B13:B105")
What I would like is when data comes across into the destination cells ( ("B13:B105") it is in the same font and format as the original i.e. that format in sheet 25 Range.
Currently the info on sheet 25 has all sorts of bold and highlighting which is not being carried across.
also if it could auto size the cells ("B13:B105") to fit the data from the range , and delete any empty rows that would be a bonus..
Here is the code I have so far. any help would be appreciated.
Sub Worksheet_Change(ByVal Target As Range)
' Predetermined values are populated in cells B13:B105 based on type of Agreement.
Application.ScreenUpdating = False
If Target.Address = "$G$11" Then
If Target = "Construction" Then
Range("B13:B105") = Sheet25.Range("A56:A148").Value
ElseIf Target = "Works" Then
Range("B13:B105") = Sheet25.Range("B56:B148").Value
ElseIf Target = "Minor Works" Then
Range("B13:B105") = Sheet25.Range("C56:C148").Value
End If
End If
Application.ScreenUpdating = False
End Sub
Any help would be appreciated.
Thanks
Jim
looking for some help with formatting cells.
I currently have a spreadsheet that automatically populates depending on a value that is in a certain cell (target address).
The information (target range) is pulled from another sheet ( Sheet 25) and then dropped into the named area I need ("B13:B105")
What I would like is when data comes across into the destination cells ( ("B13:B105") it is in the same font and format as the original i.e. that format in sheet 25 Range.
Currently the info on sheet 25 has all sorts of bold and highlighting which is not being carried across.
also if it could auto size the cells ("B13:B105") to fit the data from the range , and delete any empty rows that would be a bonus..
Here is the code I have so far. any help would be appreciated.
Sub Worksheet_Change(ByVal Target As Range)
' Predetermined values are populated in cells B13:B105 based on type of Agreement.
Application.ScreenUpdating = False
If Target.Address = "$G$11" Then
If Target = "Construction" Then
Range("B13:B105") = Sheet25.Range("A56:A148").Value
ElseIf Target = "Works" Then
Range("B13:B105") = Sheet25.Range("B56:B148").Value
ElseIf Target = "Minor Works" Then
Range("B13:B105") = Sheet25.Range("C56:C148").Value
End If
End If
Application.ScreenUpdating = False
End Sub
Any help would be appreciated.
Thanks
Jim