IF FORMULA

  • Thread starter Thread starter Debashis
  • Start date Start date
D

Debashis

hi sir,

how to use if formula in a text box, or auto shape like box??
pls help me out

thank you in advance
debashis das
 
Hi Debashis,

This is the closest thing I could come up with, but maybe someone else
has something better:

This goes in Visual Basic for Applications in the worksheet with the textbox

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
ActiveSheet.Shapes("Text Box 1").Select
Selection.Characters.Text = fncIfFormula(Range("A1"))
Target.Select
End Sub
Private Function fncIfFormula(R As Range) As String
If R = "" Then
fncIfFormula = "False"
Else
fncIfFormula = "True"
End If
End Function

Simply change the False, True, and Range, and the criteria for R to suit
your needs.

Regards,

That One Guy
 
Hi,

Select the border of the text box and type = on the formula bar, not in the
text box, then click on a cell in the spreadsheet and press enter. Then put
an IF formula in the cell and the text box will pick up the results.
 
Back
Top