Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Commenting custom formula fields/formula on formula editor | Excel Programming |