Reference range in formula problem

C

crapit

How do I indicate a cell value at other range?
I try something =IF(H17=27759,range("K7") = "yes",range("K7") ="no") but the
activecell give #name!
 
C

Chip Pearson

A worksheet formula cannot change the value of any other cell. It
can only return a value to the cell which contains the formula.

In cell K7, use the formula

=IF(H17=27759,"yes","no")



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
C

crapit

So the only is through macro?

Chip Pearson said:
A worksheet formula cannot change the value of any other cell. It
can only return a value to the cell which contains the formula.

In cell K7, use the formula

=IF(H17=27759,"yes","no")



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
C

Chip Pearson

Yes, a macro can do it, as long as it is not called from a
worksheet cell.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
C

crapit

I tried the following but it doesnt work. both H17 & J17 are individually
merge cells
Private Sub Worksheet_Change(ByVal Target As Range)

If Range("h17").Value = 123 Then
Range("j17").Value = Allocation
end if
end sub
 
Top