Results 1 to 4 of 4

Looping and Matching Data Problem

Threaded View

  1. #1
    Registered User
    Join Date
    04-30-2007
    Location
    JerseyCI/London
    Posts
    35

    Looping and Matching Data Problem

    Hi

    I need add a new worksheet that outputs sheet name and box 7 data for each sheet onto a master spreadsheet.

    I have been playing around some code but adding a third loop is a bit of nightmare and not ideal so I've just output to msgbox for testing per.

    Would application.match be better to use than the 'is like'?

    Any input, most appreciated!

    Cheers

    Danny


    Sub Box7_V1()
    Dim wsSheet As Worksheet
    Dim Cell As Range
    
        For Each wsSheet In Worksheets
        Select Case UCase(wsSheet.Name)
            Case "TEST" 'Excluded Worksheets
                 'Do nothing
            Case Else
    
           For Each Cell In wsSheet.Columns("C").Cells.SpecialCells(xlCellTypeConstants)
            If Cell.Value Like "Total:" Then
            Box7 = Cell.Offset(0, 6).Value
            Box7F = Format(Box7, "£ #,##0.00")
            End If
       
            Next
              MsgBox "Payment Summary - " & wsSheet.Name & vbNewLine & vbNewLine & _
            "Box 7: " & vbNewLine & Box7F & vbNewLine & vbNewLine
                   End Select
        Next wsSheet
    End Sub
    Last edited by l8sk8r; 01-22-2009 at 07:41 AM.
    /
    ----
    OOO

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