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: 1
Default creating a formula in textfield

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
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
Using Excel as a database and textfield C Tate[_2_] Excel Discussion (Misc queries) 13 March 12th 08 01:13 PM
Creating a formula JMP Excel Worksheet Functions 2 December 8th 06 12:42 PM
HELP creating formula! dmeals Excel Worksheet Functions 0 January 2nd 05 11:39 PM
commandbar with own textfield for datetime input ?? Frank Huebener Excel Programming 2 December 21st 03 08:33 PM
formatting a TextField as DD-MMM-YY format Tom Ogilvy Excel Programming 1 September 14th 03 06:00 PM


All times are GMT +1. The time now is 08:18 AM.

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"