PC Review


Reply
Thread Tools Rate Thread

How do I have Excel Macro write a open ended formula?

 
 
Shaka215@gmail.com
Guest
Posts: n/a
 
      9th Jan 2007
Hello!

The idea to the code below would make it possiable so that a person
could hit a button and a macro would convert the current number in the
active cell to add a formula to give the sum of the next possiable
number entered by the enduser... Think of it like the following...


END USER TYPES "9"
PRESS A BUTTON (Not keyboard) WITH A "+"
END USER TYPES "9" again...


Macro kicks in a makes it "=9+9" to have the spreadsheet display the
finished result.


This is to make it so that someone who doesn't know how to do formulas



inside of Excel could get the result they are looking for...


ActiveCell.Value = 9 (or which ever number the enduser chooses to
enter)


TAXES.ActiveCell.Formula = "=" & ActiveCell.Text & "+" & "1"
' This is the initial idea of getting it to work...The & "1" is placed
as a temporary number to complete the formula.


If Len(TAXES.ActiveCell.Text) > 0 Then
TAXES.ActiveCell.Value = Left(TAXES.ActiveCell.Text,
Len(TAXES.ActiveCell.Text) - 1)
' This code above deletes the 1 leaving the activecell formula to be
=9+(EMPTY)


* * THIS IS A MACRO TO RUN INSIDE OF A SPREADSHEET NOT A USER FORM * *


Any help is much appreciated...I been trying to figure this out the
last few days and haven't had much luck...Thanks!!!

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use macro to write formula nc Microsoft Excel Misc 1 5th Jul 2009 07:13 AM
How do I have Excel VB write a open ended formula? Shaka215@gmail.com Microsoft Excel Programming 0 9th Jan 2007 04:10 AM
How do I have Excel VB write a open ended formula? Shaka215@gmail.com Microsoft Excel Programming 1 8th Jan 2007 08:43 AM
How do I write an Excel macro to open a file using the CommonDial. =?Utf-8?B?THlubg==?= Microsoft Excel Programming 2 30th Mar 2005 02:31 PM
Auto Sum formula - how to write in Macro s_u_resh Microsoft Excel Programming 1 25th Oct 2004 06:06 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:58 PM.