+ Reply to Thread
Results 1 to 2 of 2

Combine 2 Macros

  1. #1
    al007
    Guest

    Combine 2 Macros

    Can anybody help me combine the 2 macros below:

    Sub Macro1 ()
    Sheets("FXMvt").Select
    For Each Cell In Range("O5:O119")
    If Cell.Value - 1 = Range("a1").Value Then
    Cell.Select
    End If
    Next
    If Range("A1").Value = Selection.Value - 1 Then
    MsgBox ("Tomorrow - Check for FX deal - Maturity date !!!")
    End If
    End Sub



    Sub Macro2 ()
    Sheets("FXMvt").Select
    For Each Cell In Range("O5:O119")
    If Cell.Value = Range("a1").Value Then
    Cell.Select
    End If
    Next
    If Range("A1").Value = Selection.Value Then
    MsgBox ("Today - Check for FX deal - Maturity date !!!")
    End If

    End Sub

    thxs


  2. #2
    Tom Ogilvy
    Guest

    Re: Combine 2 Macros

    Sub Macro1 ()
    Sheets("FXMvt").Select
    For Each Cell In Range("O5:O119")
    If Cell.Value - 1 = Range("a1").Value Then
    cell.Select
    MsgBox ("Tomorrow - Check for FX deal - Maturity date !!!")
    elseif Cell.Value = Range("a1").Value
    cell.Select
    MsgBox ("Today - Check for FX deal - Maturity date !!!")
    End If
    Next
    End Sub

    --
    Regards,
    Tom Ogilvy


    "al007" <[email protected]> wrote in message
    news:[email protected]...
    > Can anybody help me combine the 2 macros below:
    >
    > Sub Macro1 ()
    > Sheets("FXMvt").Select
    > For Each Cell In Range("O5:O119")
    > If Cell.Value - 1 = Range("a1").Value Then
    > Cell.Select
    > End If
    > Next
    > If Range("A1").Value = Selection.Value - 1 Then
    > MsgBox ("Tomorrow - Check for FX deal - Maturity date !!!")
    > End If
    > End Sub
    >
    >
    >
    > Sub Macro2 ()
    > Sheets("FXMvt").Select
    > For Each Cell In Range("O5:O119")
    > If Cell.Value = Range("a1").Value Then
    > Cell.Select
    > End If
    > Next
    > If Range("A1").Value = Selection.Value Then
    > MsgBox ("Today - Check for FX deal - Maturity date !!!")
    > End If
    >
    > End Sub
    >
    > thxs
    >




+ Reply to Thread

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