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: 3,355
Default Writing an IF/Then Statement in VB based on entry in a cell

I have defined the following value for a cell within my macro

Range("K" & i).Select
ActiveCell.FormulaR1C1 = _
"=((YEAR(RC[-1])-YEAR(RC[-2]))*12)+(MONTH(RC[-1])-MONTH(RC[-2]))"

If the value of this range is 0, I want to do other things. I'm not sure
how to write an "IF" statement to capture this information. How do I do
that?

Thanks in advance,
Barb Reinhardt
 
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
Force entry into cell, based on validation selection in adjacent cell Richhall[_2_] Excel Worksheet Functions 3 June 18th 09 10:28 AM
Writing a macro to hide columns based on cell value JAbels001 Excel Discussion (Misc queries) 2 April 16th 09 05:02 PM
Change Text Color in one cell based upon entry in referenced cell Tee Excel Discussion (Misc queries) 3 September 12th 08 10:07 PM
restricting entry into a cell based on entry to a previous cell newbie57 New Users to Excel 1 June 9th 08 05:43 PM
Input boxes - writing entry to cell Janet H[_2_] Excel Programming 2 August 1st 05 04:54 PM


All times are GMT +1. The time now is 09:41 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"