View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Andrew Taylor Andrew Taylor is offline
external usenet poster
 
Posts: 225
Default VBA to set value of a cell

Why not just put a formula in D2?

=IF(rng3="Shane","Private","Public")



ivory_kitten wrote:
I want to set cell D2 (named rng5) to a certain text value if cell B2 (named
rng3) equals a certain value.

Eg:

If rng3 = Shane then rng5 value to be set to "Private", else rng5 value to
be set to "Public"

Any help appreciated, thanks!