LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default IF THEN ELSE in VBA

What I am trying to do:
If the user has cell M3 selected, then change cell S8 to show the dat
in cell K57. If the user has cell M5 selected, change cell S8 to sho
the data in cell K58...and so on.

Here is what I have that is not working.

Sub FieldTip()
If ActiveCell.Value = ("M3") Then Range("S8").Value = ("K57")
Else: If ActiveCell.Value = ("M5") Then Range("S8").Value = ("K58")
Else: Range("S8").Value = " "
End If
End Sub

Any help would be greatly appreciated

--
Message posted from http://www.ExcelForum.com

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"