Hi everybody,
Suppose I have a cell A8 which is written thru a code (as shown below), I need to check if some value is existing in it or not, if it exists it has to append it with a "+" sign.
Code
Sub recal()
Worksheets(3).Activate
Application.Volatile
'The inclusion of the Application.Volatile method means that every time the
'worksheet is recalculated, this function (macro) is again run.
Application.ScreenUpdating = True
ActiveCell.Font.ColorIndex = 2 + Range("H10").Value
Select Case ActiveCell.Value
Case "MIS + Recurring"
'Selection.Offset(3, 1).Range("A1").Select
'selects the cell three rows down from and one column to the
'right of the cell in the upper-left corner of the current selection
'Process for MIS
ActiveCell.Offset(5, 1).Select
'ActiveCell.Value = "Return on MIS"
ActiveCell.Value = "RMIS"
ActiveCell.Font.ColorIndex = 2 + Range("H10").Value
Selection.Font.Bold = True
Worksheets("Interest Calculations").Range("C3").Value = Application.InputBox( _
Prompt:="Please type the Amount to Invest", Type:=1)
ActiveCell.Offset(0, 1).Value = Worksheets("Interest Calculations").Range("F13")
'Process for Recurring
ActiveCell.Offset(1, 0).Select
'ActiveCell.Value = "Return on Recurring"
ActiveCell.Value = "RR"
ActiveCell.Font.ColorIndex = 2 + Range("H10").Value
Selection.Font.Bold = True
ActiveCell.Offset(0, 1).Value = Worksheets("Interest Calculations").Range("F14")
ActiveCell.Offset(1, 0).Select
Selection.ClearContents
MsgBox Worksheets("Interest Calculations").Range("F17").Value
Range("H10").Value = Range("H10").Value + 1
Case "NSC"
'Range("C15").ClearContents
'Range("C16").ClearContents
ActiveCell.Offset(7, 0).Select
ActiveCell.Value = "Return on N"
ActiveCell.Font.ColorIndex = 2 + Range("H10").Value
Selection.Font.Bold = True
Worksheets("Interest Calculations").Range("D50").Value = Application.InputBox( _
Prompt:="Please type the Amount to Invest", Type:=1)
ActiveCell.Offset(0, 1).Value = Worksheets("Interest Calculations").Range("D51").Value
Case "Mutual Fund"
DO SUMTHING
Case Else
MsgBox "Please enter MIS + Recurring /NSC /Mutual Fund /Test1 /Test2 for this Cell"
End Select
Columns("D").AutoFit
End Sub
Display More