Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Using variables within a formula in the same cell.

How do I make a formula with a variable (ex. 4+x), and make is so when I type
in a number into that cell it puts that number in as the variable? Is this
even possible? Thanks for your help in advance cause this problem has taken
way too much of my time already!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Using variables within a formula in the same cell.

Not just 100% sure what you want to do. Are you wanting to put a formula in
Cell A1 such as =4+x and then in cell A1 type a 3 and heve the cell value
automatically be 7... or are you wanting something else entirely.
--
HTH...

Jim Thomlinson


"bbhart" wrote:

How do I make a formula with a variable (ex. 4+x), and make is so when I type
in a number into that cell it puts that number in as the variable? Is this
even possible? Thanks for your help in advance cause this problem has taken
way too much of my time already!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Using variables within a formula in the same cell.

If?? you mean that you want to type in 1 and get 4, type in 2 and get 8 you
can do this with a worksheet_change event macro.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bbhart" wrote in message
...
How do I make a formula with a variable (ex. 4+x), and make is so when I
type
in a number into that cell it puts that number in as the variable? Is this
even possible? Thanks for your help in advance cause this problem has
taken
way too much of my time already!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Using variables within a formula in the same cell.

Yeah... sorry... I should have been more specific. That's exactly what I'm
trying to do.

"Jim Thomlinson" wrote:

Not just 100% sure what you want to do. Are you wanting to put a formula in
Cell A1 such as =4+x and then in cell A1 type a 3 and heve the cell value
automatically be 7... or are you wanting something else entirely.
--
HTH...

Jim Thomlinson


"bbhart" wrote:

How do I make a formula with a variable (ex. 4+x), and make is so when I type
in a number into that cell it puts that number in as the variable? Is this
even possible? Thanks for your help in advance cause this problem has taken
way too much of my time already!

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,939
Default Using variables within a formula in the same cell.

2 ways to do it... One is to use VBA and capture the cell change and apply
your formula through that or you can do it with a bit of hocus pocus using
the Camera tool. Here is a link to the Camera Tool thing.

http://j-walk.com/ss/excel/odd/odd04.htm

Place a formula on sheet 2 something to the effect of =Sheet1!A1 + 4
On sheet 1 format Cell A1 such that the font colour is the same as the
background colour (probably white). If you follow those steps from the web
site I posted you can make it work...
--
HTH...

Jim Thomlinson


"bbhart" wrote:

Yeah... sorry... I should have been more specific. That's exactly what I'm
trying to do.

"Jim Thomlinson" wrote:

Not just 100% sure what you want to do. Are you wanting to put a formula in
Cell A1 such as =4+x and then in cell A1 type a 3 and heve the cell value
automatically be 7... or are you wanting something else entirely.
--
HTH...

Jim Thomlinson


"bbhart" wrote:

How do I make a formula with a variable (ex. 4+x), and make is so when I type
in a number into that cell it puts that number in as the variable? Is this
even possible? Thanks for your help in advance cause this problem has taken
way too much of my time already!



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Using variables within a formula in the same cell.

right click sheet tabview codeinsert this. Now if you put 1 in cell b1 you
get 5 in cell b1

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$B$1" Then Exit Sub
Application.EnableEvents = False
Target = Target + 4
Application.EnableEvents = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"bbhart" wrote in message
...
Yeah... sorry... I should have been more specific. That's exactly what I'm
trying to do.

"Jim Thomlinson" wrote:

Not just 100% sure what you want to do. Are you wanting to put a formula
in
Cell A1 such as =4+x and then in cell A1 type a 3 and heve the cell value
automatically be 7... or are you wanting something else entirely.
--
HTH...

Jim Thomlinson


"bbhart" wrote:

How do I make a formula with a variable (ex. 4+x), and make is so when
I type
in a number into that cell it puts that number in as the variable? Is
this
even possible? Thanks for your help in advance cause this problem has
taken
way too much of my time already!


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
Variables in URL formula help teepee[_2_] Excel Discussion (Misc queries) 4 May 9th 07 04:20 PM
Syntax for using variables in a cell formula to reference paths/fi colorado808 Excel Worksheet Functions 4 March 15th 07 03:41 AM
Using variables in a cell/formula Wayne Knazek Excel Worksheet Functions 1 July 6th 06 05:30 PM
Vary variables in a formula via reference to another cell Peter Excel Discussion (Misc queries) 2 July 21st 05 07:19 PM
cell variables in IF formula Micayla Bergen Excel Discussion (Misc queries) 5 June 6th 05 08:09 AM


All times are GMT +1. The time now is 08:56 PM.

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"