Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Somecallmejosh
 
Posts: n/a
Default Macro with formulas...

Hello,

I am trying to create a macro that records "ultra-
repetative" keystrokes in a spreadsheet.

I have to select a cell, enter the "=" sign in it, then
select the cell directly above it. If I start in cell A2,
then, at this point, it will read.. "=(A1" in cell A2...

I need an absolute reference on the A1 cell reference in
the formula contained in cell A2, so I type it in as
such "=($A$1"

At this point, I know that I'm going to add cell A1 to
another random cell in the spreadsheet...
while the macro is still recording I finish typing what I
need the macro to be...

=($A$1+

That's it... that's all I want. Is there something that
states I cannot record a macro on an incomplete formula,
or is there some type of workaround?



  #2   Report Post  
Kassie
 
Posts: n/a
Default

You will have to use an inputbox to obtain the rest of the formula, then add
the result to the formula, before dropping it in the relevant cell.

You could use something like

Sub Macro1()
Dim varEnd

varEnd = Application.InputBox("Insert criteria", "Remainder of Formula")
ActiveCell.Value = "=$A$1" & varEnd

End Sub

If you then want to insert +A20, to get a formula reading =$A$1+A20, then
you would enter +A20 in the inputbox, and click on OK. to run the macro,
press<Alt<F8, and select the macro

HTH

"Somecallmejosh" wrote:

Hello,

I am trying to create a macro that records "ultra-
repetative" keystrokes in a spreadsheet.

I have to select a cell, enter the "=" sign in it, then
select the cell directly above it. If I start in cell A2,
then, at this point, it will read.. "=(A1" in cell A2...

I need an absolute reference on the A1 cell reference in
the formula contained in cell A2, so I type it in as
such "=($A$1"

At this point, I know that I'm going to add cell A1 to
another random cell in the spreadsheet...
while the macro is still recording I finish typing what I
need the macro to be...

=($A$1+

That's it... that's all I want. Is there something that
states I cannot record a macro on an incomplete formula,
or is there some type of workaround?




  #3   Report Post  
Somecallmejosh
 
Posts: n/a
Default

Thank you very much, I will try this and send feedback
upon completion.

-----Original Message-----
You will have to use an inputbox to obtain the rest of

the formula, then add
the result to the formula, before dropping it in the

relevant cell.

You could use something like

Sub Macro1()
Dim varEnd

varEnd = Application.InputBox("Insert

criteria", "Remainder of Formula")
ActiveCell.Value = "=$A$1" & varEnd

End Sub

If you then want to insert +A20, to get a formula reading

=$A$1+A20, then
you would enter +A20 in the inputbox, and click on OK.

to run the macro,
press<Alt<F8, and select the macro

HTH

"Somecallmejosh" wrote:

Hello,

I am trying to create a macro that records "ultra-
repetative" keystrokes in a spreadsheet.

I have to select a cell, enter the "=" sign in it, then
select the cell directly above it. If I start in cell

A2,
then, at this point, it will read.. "=(A1" in cell A2...

I need an absolute reference on the A1 cell reference

in
the formula contained in cell A2, so I type it in as
such "=($A$1"

At this point, I know that I'm going to add cell A1 to
another random cell in the spreadsheet...
while the macro is still recording I finish typing what

I
need the macro to be...

=($A$1+

That's it... that's all I want. Is there something

that
states I cannot record a macro on an incomplete

formula,
or is there some type of workaround?




.

Reply
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
Fill formulas down in macro hhunt Excel Discussion (Misc queries) 2 February 17th 05 09:03 PM
Macro to repeat formulas in next row katiekay Excel Discussion (Misc queries) 5 February 10th 05 08:28 PM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM
Building a table with formulas rather than a macro Daniel Bonallack Excel Worksheet Functions 3 January 20th 05 08:55 PM
Macro for formulas MsAmethyst Excel Worksheet Functions 1 October 28th 04 06:32 PM


All times are GMT +1. The time now is 11:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"