Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
combine two macros puiuluipui Excel Discussion (Misc queries) 4 May 21st 09 10:30 AM
How do I combine MACROS and functions? Mr_Crowe New Users to Excel 1 July 9th 08 02:23 AM
Combine 2 macros into 1 Please. Steved Excel Programming 3 May 24th 07 06:29 PM
combine two macros Lisa Excel Worksheet Functions 1 July 20th 06 02:10 AM
Combine 2 macros Steph[_3_] Excel Programming 0 January 20th 04 03:05 PM


All times are GMT +1. The time now is 11:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"