Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Macro formula help

I have a macro that needs to check the value of a cell in a different
worksheet. The cell has a defined name called "mend_tape_cnt". How can I
write a formula within the macro to perform an "IF" statement against this
cell value.
For example:
If "mend_tape_cnt" 0 then
......
else
......
End If

thanks for the help,

El Bee
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Macro formula help

Use
If Range("mend_tape_cnt") 0 then

best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"El Bee" wrote in message
...
I have a macro that needs to check the value of a cell in a different
worksheet. The cell has a defined name called "mend_tape_cnt". How can I
write a formula within the macro to perform an "IF" statement against this
cell value.
For example:
If "mend_tape_cnt" 0 then
......
else
......
End If

thanks for the help,

El Bee



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Macro formula help

This works fine when entering the formula within a cell but I trying to
figure out how to write the formula within a macro so that if the
"mend_tape_cnt" is greater than zero do whaterver else do something else.

"Don Guillett" wrote:

If range("mend_tape_cnt") 0 then


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"El Bee" wrote in message
...
I have a macro that needs to check the value of a cell in a different
worksheet. The cell has a defined name called "mend_tape_cnt". How can I
write a formula within the macro to perform an "IF" statement against this
cell value.
For example:
If "mend_tape_cnt" 0 then
......
else
......
End If

thanks for the help,

El Bee



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Macro formula help

If Range("mend_tape_cnt").Value 0 then
--
Gary''s Student - gsnu200808


"El Bee" wrote:

I have a macro that needs to check the value of a cell in a different
worksheet. The cell has a defined name called "mend_tape_cnt". How can I
write a formula within the macro to perform an "IF" statement against this
cell value.
For example:
If "mend_tape_cnt" 0 then
......
else
......
End If

thanks for the help,

El Bee



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 58
Default Macro formula help

This did the trick; thanks for the help

"Gary''s Student" wrote:

If Range("mend_tape_cnt").Value 0 then
--
Gary''s Student - gsnu200808


"El Bee" wrote:

I have a macro that needs to check the value of a cell in a different
worksheet. The cell has a defined name called "mend_tape_cnt". How can I
write a formula within the macro to perform an "IF" statement against this
cell value.
For example:
If "mend_tape_cnt" 0 then
......
else
......
End If

thanks for the help,

El Bee

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula or Macro M Hebert Excel Discussion (Misc queries) 2 June 27th 07 01:24 PM
formula in macro Lori Excel Worksheet Functions 6 May 11th 07 02:33 PM
help with the macro or with the formula Igneshwara reddy[_2_] Excel Worksheet Functions 6 March 22nd 07 09:16 PM
Add formula to Macro??? [email protected] New Users to Excel 3 July 9th 06 02:29 PM
Macro and Formula strung Excel Worksheet Functions 3 September 6th 05 02:43 PM


All times are GMT +1. The time now is 05:14 PM.

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"