Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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   Report Post  
Posted to microsoft.public.excel.misc
Don Don is offline
external usenet poster
 
Posts: 487
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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
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
IF formula-simple question; simple operator Rich D Excel Discussion (Misc queries) 4 December 6th 07 03:36 PM
Simple excel question for newbie Opa Excel Worksheet Functions 4 November 2nd 06 03:29 AM
excel charts, simple question PH NEWS Excel Worksheet Functions 6 February 9th 06 12:05 PM
Simple Simple Excel usage question BookerW Excel Discussion (Misc queries) 1 June 23rd 05 10:06 PM
Simple for you, tough for me, basic excel question cup0spam Excel Discussion (Misc queries) 1 May 31st 05 06:10 AM


All times are GMT +1. The time now is 03:10 PM.

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

About Us

"It's about Microsoft Excel"