Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set another cell´s value??? 1

Status
Not open for further replies.

NiteCrawlr

Programmer
Mar 16, 2001
140
BR
How can I check in Excel if one cell´s value is, for example, "OK", if it is true then I want another cell´s value to be "100%"?

for example
I´m typing the code in D1,
I´m checking if B1 equals to "OK"
If it is true, I want cell A1 to be equal to "100%"

Tks,

NiteCrawlr
 
Basically, that's not how it works.

Try this instead:

In A1, put:

=if(b1="ok",100%,"")


The "" means don't put anything in cell A1 unless B1 equals ok.

:)

 
Use an IF statement in Cell A1

IF(b1="OK","100%","Not 100%")

To get B1 to read "OK" then use an IF statement in B1 too
along the lines of

IF(D1>200,"OK","No Way José")

Hwyl
Jonsi :)
 
but isn´t it possible for me to control a cell´s value from another cell?
 
If you want a VBA solution, just say the word.
 
yes, If it is not too much to ask :)

Tks a lot

NiteCrawlr
 
In the code for the sheet:
Code:
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
    If Target.Address Like "$B$1" Then
        If Range("B1") = "OK" Then
            Range("A1") = "100%"
        Else
            Range("A1") = "Not 100%"
        End If
    End If
End Sub
If B1 changes value, the value in A1 is updated accordingly. There are many ways to handle this, but you get the point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top