Consulting

Results 1 to 2 of 2

Thread: excel vba to autofit row after cell update

  1. #1
    VBAX Regular
    Joined
    Feb 2007
    Posts
    17
    Location

    excel vba to autofit row after cell update

    Hi, can anyone help please....basically I have data updated (formula) in column G dependant on what is entered in column C so need to autofit the row that has changed in rows 5 to 95.

    Any help greatly appreciated.

  2. #2
    VBAX Tutor nst1107's Avatar
    Joined
    Nov 2008
    Location
    Monticello
    Posts
    245
    Location
    How about something along the lines of:[vba]Option Explicit
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Intersect(Target, Range("G5:G95")) Is Nothing Then Exit Sub
    Columns("G").AutoFit
    End Sub[/vba]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •