LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9   Report Post  
Beancounter
 
Posts: n/a
Default

Gord,
Thank you for your assistance. Chip Pearson sent me the macro I needed, and
it worked perfectly. I have never used this support community before, but I
am so impressed with all the great help I got right away. Thanks again!!
Yours,
Bean

"Gord Dibben" wrote:

Bean

Without seeing a sample of your data it is hard to tell whether or not your
formulas will work when you do get the = sign inserted.

If data is a text string like 2+3+5+(12+20)*10 then a UDF will work.

Function EvalCell(RefCell As String)
Application.Volatile
EvalCell = Evaluate(RefCell)
End Function

Copy the above function and paste into a General Module in your workbook.

Assume A1 has the above text string.

In B1 enter =EvalCell(A1) to return 330

Double-click on fill handle of B1 to copy formula down until end of data in
column A.

To add an = sign(or any other text at left)to existing cells use this macro.

Sub Add_Text_Left()
Dim Cell As Range
Dim moretext As String
Dim thisrng As Range
On Error GoTo endit
Set thisrng = Range(ActiveCell.Address & "," & Selection.Address) _
.SpecialCells(xlCellTypeConstants, xlTextValues)
moretext = InputBox("Enter your Text")
For Each Cell In thisrng
Cell.Value = moretext & Cell.Value
Next
Exit Sub
endit:
MsgBox "only formulas in range"
End Sub


Gord

On Sat, 22 Jan 2005 15:05:01 -0800, "Beancounter"
wrote:

Yes, I need to create a formula from the existing cell contents by simply
adding a = sign to the cell's current contents (over 12,000 cells in one
column). I, too, thought a macro would work, but don't know how to program
it to repeat the keystroke series "F2, Home, =, Enter" in a columnar range.
Many thanks for your assistance.
-Bean

"Gord Dibben" wrote:

Bean

Sounds like you are attempting to add an = sign to existing cell contents.

For what purpose? To create a formula? What is the data currently in the
cells?

Perhaps there is another way to do what you want.

I can think of a User Defined Function that evaluates cell contents depending
upon what is currently entered in the cells.

Or a macro that will add the = sign to all cells if that's all you want.


Gord Dibben Excel MVP

On Sat, 22 Jan 2005 13:09:03 -0800, "Beancounter"
wrote:

I want to program an Excel macro to set a columnar range, then perform the
keystroke series "F2, Home, =, Enter" repeatedly until the end of the range
is reached. How do I teach the macro to automatically repeat the keystoke
series? I am using XP, and Excel 2002 10.4. Thanks for your help!!!




 
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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
How to change the color of all series in an excel chart in one go. Marielle Charts and Charting in Excel 2 May 3rd 23 07:45 PM
How do I create a macro of editing keystrokes? scjanner Excel Discussion (Misc queries) 0 January 21st 05 11:07 PM
How to change the color of all series in an excel chart in one go. Mz2 Charts and Charting in Excel 1 January 20th 05 01:07 AM
Macro in Excel 2002 to save a workbook to a FTP location Lloyd Excel Discussion (Misc queries) 0 December 21st 04 02:49 PM


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