Let A1 be 1234
let B1 = 5678
let c1 formula be: " change A1 to 'ok', if b1 = 5678
Let A1 be 1234
let B1 = 5678
let c1 formula be: " change A1 to 'ok', if b1 = 5678
No formula can change the value in another cell.
Or, put differently, a formula can only display its result in the cell in which it resides. Therefore, if you wish to show different results in A1 depending upon the value of another cell the formula must reside in A1.
Let C1 = 1234.
Let B1 = 5678
[A1] = IF(B1=5678,"ok",C1)
The above would do the job provided that you can arrange your data entry in such a way as to make entering 1234 in C1 logical. That isn't normally the case. Therefore my own tendency would be to use VBA. However, coming to think of it, I haven't had that problem in a long, long time. I guess I just design my worksheets differently now, such as, letting A1 be 1234 (or whatever) and placing the "OK" in the column next to it.
Try:
=IF(B1=5678,"ok",,1234)
Put that formula into cell A1