Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
VBA/Excel Dynamic cell reference
Name: quackadilly Date: July 21, 2007 at 10:26:41 Pacific OS: XP pro CPU/Ram: AMD64
Comment:
I'm trying to reference a alue that is stored in a cell.
Name: quackadilly Date: July 21, 2007 at 11:46:00 Pacific
Reply:
cell "S1" is essentially a *pointer. In this example is contains the value "J2", which is where I want to paste my data.
the value in "S1" is determining where the number in "E15" is going.("J2")
0
Response Number 3
Name: Razor2.3 Date: July 21, 2007 at 11:52:49 Pacific
Reply:
So, do you want it to grab the "pointer," make a new "pointer," or the final value?
0
Response Number 4
Name: quackadilly Date: July 21, 2007 at 12:12:56 Pacific
Reply:
"S1" is pointing to the cell where the final value is placed.
"E15" has the value 1. "S1" has the value "J2". I want "J2" to have the value of 1.
But the value of "S1" changes and VBA won't let me use the code in my first post.
0
Response Number 5
Name: Razor2.3 Date: July 21, 2007 at 12:33:29 Pacific
Reply:
Of course it doesn't let you use your code; the flow of logic is incompatible with VBA. I'm surprised it actually compiled. After all, after I read it, I had to ask you what you wanted.
This line (It's really one line; I blame the line wrapping, myself.) will copy whatever is displayed in the cell "S1" (and not the pointer itself): Sheets("Archive").Range("J2").Formula = Sheets("Form").Range("S1").Value
If you wanted the pointer, I'd just drop the VBA attempt and change J2's formula to read: =Form!$S$1
0
Response Number 6
Name: quackadilly Date: July 21, 2007 at 13:07:37 Pacific
Reply:
But it won't always point to "J2". That's the problem.
Summary: I have created a macro in excel. I edit (F2), delete some unwanted text, and press enter. What happens is the entire contents of the first (original) cell is "copied" to any other cell in which I exe...
Summary: Hello, I have this script: '================================= Private Sub CommandButton1_Click() 'Randomizing Lists MsgBox ("Before running this script, you will need:" & Chr(13) & _ "The...
Summary: Hey i have a whole data sheet worth of car types ex. Sedan coupe compact etc.... i have mad a dropbox and have input all of those names, but now i want to be able to reference all the cells that say s...