Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I could use some help on this error I'm receiving. I have trie
everything I can think of. I am using a formula that takes the sum o 2 fields and combines them. Sometimes the 2 fields will not contai any information, so I don't want it to put anything in the 3rd field. How do I do this? This is my code so far: ActiveCell.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])" ActiveCell.Offset(1, 0).Range("A1").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])" ActiveCell.Offset(1, 0).Range("A1").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])" ActiveCell.Offset(1, 0).Range("A1").Select ActiveCell.FormulaR1C1 = "=SUM(RC[-2]:RC[-1])" ActiveCell.Offset(1, 0).Range("A1").Select Example : If A1 & B1 contain data, then C1 =SUM(A1:B1), but if A1 or B does not contain data, then C1 needs to be left blank. Thanks for the help -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using Excel as a database and textfield | Excel Discussion (Misc queries) | |||
Creating a formula | Excel Worksheet Functions | |||
HELP creating formula! | Excel Worksheet Functions | |||
commandbar with own textfield for datetime input ?? | Excel Programming | |||
formatting a TextField as DD-MMM-YY format | Excel Programming |