Do I need If Then?
for that approach you would need 11 columns x n rows of if statements. If
you have on 20 possible table sheets to go to, that doesn't make much sense.
If you have a rule that would be used, then you would want to code the rule.
Or you could set up another table on another sheet where you lookup the
letter and column number and return the sheet to go to.
--
Regards,
Tom Ogilvy
"Billy" wrote:
Tom Ogilvy wrote:
How would the macro determine where to go based on the letter and column
combination.
assume the cell in column E would correspond to the cell selected in one of
columns F to P
set rng = Intersect(columns(5),ActiveCell.EntireRow)
sLetter = rng.Value
Now what?
--
Regards,
Tom Ogilvy
Tom, I am sorry that my desrciption is not concise and clear. Let me summuarize briefly:
1. I would create 20 "table"worksheets, each sheet having a particular
table.
2. On each row of the "main" worksheet, I would enter a code letter in
column E.
3. I would then go to cell in the same row column F, making F the
active column, and, if I need to refer to a table worksheet, I would
invoke a macro [Crlt-Shift Z for example], and the macro would do
something like...IF the value in col E = "M" and the active column = F,
THEN go to sheet 9.
4. After viewing the table in sheet 9, I would then want to press ENTER
or any other key and go back to the cell that was active when I invoked
the macro I could enter the value I viewed in the table.
As i mentioned before the column from which i invoke the macro could be
from col F to col P.
I hope this is more clear, and i apologize for not being able to be
more clean AND concise.
Thanks,
Billy
I need a macro that sort of performs a lookup, based on first, the
letter I would input in col. E, and then second, the column that the
curser is in, (which could be any or all cols. from F - P) and then,
when i invoke it, displays a corresponding sheet that will contain a
table I will make that relates to that letter/column combo. I dont know
if it would be an If-Then type procedure or what, but is is certainly
beyond my capability to do. Please not that this letter/column scenario
is repeated on row after row in my spreadsheet, and not just one row.
Thank you very much,
Billy
|