Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 51
Default marco issues

Hi I am new to here, and have a question. I have figured out how I want to
make the input box, but not how to incorpoarate the answer to my fomula.

What I need to do is add a cell address to a formula, but I need to change
the cell address to run different resaults.

What I have so far is very simple as I am trying to get it to work before I
try it on the main workbook.
Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
ActiveCell.FormulaR1C1 = "=R[-1]C[2] + 0 "
Range("D7").Select

Where 0 is I want to put the resualts of the cell I have just entered. Any
suggestions? Thanks in advance!



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default marco issues


ActiveCell.FormulaR1C1 = "=R[-1]C[2] + 0 "


Try

ActiveCell.FormulaR1C1 = "=R[-1]C[2] + " & Res


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)



"Melody" wrote in message
...
Hi I am new to here, and have a question. I have figured out how I want
to
make the input box, but not how to incorpoarate the answer to my fomula.

What I need to do is add a cell address to a formula, but I need to change
the cell address to run different resaults.

What I have so far is very simple as I am trying to get it to work before
I
try it on the main workbook.
Res = InputBox("What is the cell address?")
If StrPtr(Res) = 0 Then
MsgBox "User Clicked Cancel"
ElseIf Res = vbNullString Then
MsgBox "User Clicked OK with no input"
Else
MsgBox "User Entered cell " & Res
End If
'
ActiveCell.FormulaR1C1 = "=R[-1]C[2] + 0 "
Range("D7").Select

Where 0 is I want to put the resualts of the cell I have just entered.
Any
suggestions? Thanks in advance!





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
Help with marco Gary Keramidas Excel Programming 1 December 2nd 06 05:17 AM
marco help mr1104839 Excel Programming 2 August 17th 06 05:42 PM
help me with this marco Gary Keramidas Excel Programming 1 April 22nd 06 02:01 AM
I need some help with a Marco xgunda420x Excel Discussion (Misc queries) 2 August 2nd 05 01:43 PM
Can it be done by marco? kaon[_5_] Excel Programming 1 June 28th 04 10:56 AM


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