Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default If then else

I'd like to writer a macro to execute certain activities dependent on the
value of a cell.
Thx.
cg
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default If then else

hccatmo wrote:

I'd like to writer a macro to execute certain activities dependent on the
value of a cell.



x=Range("A1").value

-------------------

Select case x
Case 1 to 3
...

Case ...

end select

-------------------

On x gosub routine1, routine2, ...

----------------------------------

y = Application.Run("file.xls!Macro", x)

----------------------------------------



()---cucchiaino
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default If then else

Thx. Great help.
cg

"cucchiaino" wrote:

hccatmo wrote:

I'd like to writer a macro to execute certain activities dependent on the
value of a cell.



x=Range("A1").value

-------------------

Select case x
Case 1 to 3
...

Case ...

end select

-------------------

On x gosub routine1, routine2, ...

----------------------------------

y = Application.Run("file.xls!Macro", x)

----------------------------------------



()---cucchiaino

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default If then else

Your question is about a whole programming topic.

To begin, you may go to Visual Basic Editor, call the Help, and type "IF
statement" in the search box. Then choose "Using If...Then...Else Statements".

The on-line help is a very useful source of technical information.

Regards,
Edwin Tam

http://www.vonixx.com



"hccatmo" wrote:

I'd like to writer a macro to execute certain activities dependent on the
value of a cell.
Thx.
cg

Reply
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 02:27 PM.

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

About Us

"It's about Microsoft Excel"