If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Probably a stupid Question but ah well

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-28-06, 13:25
Amazing_Spiderman Amazing_Spiderman is offline
Registered User
 
Join Date: Aug 2006
Posts: 21
Having a cell point out to which variable to use in equation.

Heres the Scenario:

In Excel:

Cells(1,1) = "Variable1"
Cells(1,2) = "+"
Cells(1,3) = "Variable2"

In VBA
Dim Variable1 as integer, Variable2 as integer
Variable1=1
Varable2=1
Test = Cells(1,1) & Cells(1,2) & Cells(1,3)

Obviously this will not work
But the Idea I want to convey is that is it possible to have this statement return a value of 2

Let me know if you need me to explain further.

Last edited by Amazing_Spiderman; 09-30-06 at 07:04.
Reply With Quote
  #2 (permalink)  
Old 09-30-06, 07:08
Amazing_Spiderman Amazing_Spiderman is offline
Registered User
 
Join Date: Aug 2006
Posts: 21
The only other thing i can think of is using a Len Statement and a Select Case Statement to pick out which variable or sign is chosen.
Reply With Quote
  #3 (permalink)  
Old 09-30-06, 10:23
Amazing_Spiderman Amazing_Spiderman is offline
Registered User
 
Join Date: Aug 2006
Posts: 21
Issue Resolved ... Len Statements and Select Cases work perfectly
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On