![]() |
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 |
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" wrote in message oups.com... 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 |
All times are GMT +1. The time now is 08:45 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com