Results 1 to 12 of 12

Change formula to VBA

Threaded View

  1. #1
    Registered User
    Join Date
    07-02-2009
    Location
    the Island of Australia
    MS-Off Ver
    Excel 2003
    Posts
    9

    Change formula to VBA

    Hi I need to do 1 of 2 things.

    1. change the following to VBA instead of a formula

    =IF(ROW()<=$Q$1,INDEX('\\Titan\Incident Management\Projector\Reporting\[All_Open_and_Pending_Faults.xls]Sheet1'!C:C,ROW()),INDEX('\\Titan\Incident Management\Projector\Reporting\[All_Open_and_Pending_Faults_FM2.xls]Sheet1'!C:C,ROW()-$Q$1+1))

    or alter the following so it will look for the cell value rather than the formula in the cell
    Private Sub CommandButton1_Click()
    Application.ScreenUpdating = False
    With Columns("M")
        .AutoFilter field:=1, Criteria1:="CLUSTER 3"
        .Resize(Rows.Count - 1).Offset(1).EntireRow.Delete
    End With
    ActiveSheet.AutoFilterMode = False
    Application.ScreenUpdating = True
    End Sub
    My problem is that now that I can join 2 reports together i cannot run the VBA script i have found to filter/delete data that I dont want as it seems to be checking the formula and not the value presented.

    i would prefer if i could chage the formula to VBA so that users of this workbook do delet formulas by mistake.

    Thanks
    Last edited by royUK; 07-23-2009 at 02:08 AM. Reason: add code tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1