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


"Novice" wrote in message
...

I would like to use the IF Formula to check the contents of a cell and
place a "Yes" if true or nothing if False. The standard formula of IF
(A27=0,"Yes","") doesn't work in VBA because of the quotation marks for
some reason. How do I do it?

Also, I would like to counter the rows by 14 and place the result in a
column. In other words, check A27 and place the result in H1 on
Sheet3. Then check A41 and place the result in H2 and so on. Thanks.
Tom - you've been a huge help!! I unfortunately learn by example - I
wish there was a site or reference materials available that catered to
the very beginner! Thanks again!!


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/


If you want to use VB to put a formula in a cell, the formula must be
surrounded by double quotes since it is text. Since the IF requires double
quotes within the formula, you need to use double double quotes. Maybe this
example makes more sense:

Range("A28").formula = "=if(A27=0,""Yes"","""") "

--Kiloran


 
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
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


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