Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Simple VB for Excel Question
I want to create a macro that will check a cell (E5) which is a formula
=IF(ABS(SUM(J70:BD70))1,"Not Balanced","Balanced") and if it has "Balanced" , then I want to put "Processed" in cell G6 and put a time stamp in cell F6, if "Not Balanced" , then zero out cell G6 and F6? Here is what I have so far that is trying to just display a text box , so be kind Sub ProB() Dim GetDealNStat As String Cells(5, 5).Select GetDealNStat = Selection.Value If GetDelNStat = "Balanced" Then MsgBox "RECON Balanced", GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal", GetDealNStat, vbExclamation End If End Sub |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Simple VB for Excel Question
Maybe
Sub ProB() Dim GetDealNStat As String GetDealNStat = Cells(5, 5).Value If Cells(5, 5).Value = "Balanced" Then MsgBox "RECON Balanced " & GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal " & GetDealNStat, vbExclamation End If End Sub Mike "Don" wrote: I want to create a macro that will check a cell (E5) which is a formula =IF(ABS(SUM(J70:BD70))1,"Not Balanced","Balanced") and if it has "Balanced" , then I want to put "Processed" in cell G6 and put a time stamp in cell F6, if "Not Balanced" , then zero out cell G6 and F6? Here is what I have so far that is trying to just display a text box , so be kind Sub ProB() Dim GetDealNStat As String Cells(5, 5).Select GetDealNStat = Selection.Value If GetDelNStat = "Balanced" Then MsgBox "RECON Balanced", GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal", GetDealNStat, vbExclamation End If End Sub |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Simple VB for Excel Question
Mike, this got it , thanks for the help
"Mike H" wrote: Maybe Sub ProB() Dim GetDealNStat As String GetDealNStat = Cells(5, 5).Value If Cells(5, 5).Value = "Balanced" Then MsgBox "RECON Balanced " & GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal " & GetDealNStat, vbExclamation End If End Sub Mike "Don" wrote: I want to create a macro that will check a cell (E5) which is a formula =IF(ABS(SUM(J70:BD70))1,"Not Balanced","Balanced") and if it has "Balanced" , then I want to put "Processed" in cell G6 and put a time stamp in cell F6, if "Not Balanced" , then zero out cell G6 and F6? Here is what I have so far that is trying to just display a text box , so be kind Sub ProB() Dim GetDealNStat As String Cells(5, 5).Select GetDealNStat = Selection.Value If GetDelNStat = "Balanced" Then MsgBox "RECON Balanced", GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal", GetDealNStat, vbExclamation End If End Sub |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Simple VB for Excel Question
Glad I could help and thanks for the feedback
Mike "Don" wrote: Mike, this got it , thanks for the help "Mike H" wrote: Maybe Sub ProB() Dim GetDealNStat As String GetDealNStat = Cells(5, 5).Value If Cells(5, 5).Value = "Balanced" Then MsgBox "RECON Balanced " & GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal " & GetDealNStat, vbExclamation End If End Sub Mike "Don" wrote: I want to create a macro that will check a cell (E5) which is a formula =IF(ABS(SUM(J70:BD70))1,"Not Balanced","Balanced") and if it has "Balanced" , then I want to put "Processed" in cell G6 and put a time stamp in cell F6, if "Not Balanced" , then zero out cell G6 and F6? Here is what I have so far that is trying to just display a text box , so be kind Sub ProB() Dim GetDealNStat As String Cells(5, 5).Select GetDealNStat = Selection.Value If GetDelNStat = "Balanced" Then MsgBox "RECON Balanced", GetDealNStat, vbExclamation Else MsgBox "Deal is not Balanced, Please balance deal", GetDealNStat, vbExclamation End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Simple excel question for newbie | Excel Worksheet Functions | |||
excel charts, simple question | Excel Worksheet Functions | |||
Simple Simple Excel usage question | Excel Discussion (Misc queries) | |||
Simple for you, tough for me, basic excel question | Excel Discussion (Misc queries) |