View Single Post
  #5  
Old April 15th, 2010, 03:44 PM posted to microsoft.public.excel.worksheet.functions
Steve Dunn
external usenet poster
 
Posts: 192
Default Use Vlookup to store formulas?

Hi Patrick,

I'm guessing from the lack of responses that others are as confused as I am,
but maybe this will help you. MATCH() will return a position in your lookup
range, so you could use something like

=MATCH(A1, OFFSET(Lookup_MoistCondition,,,,1), 0)

in a helper column (say E in this example), then use INDEX() to retrieve the
details from each respective column

=INDEX(OFFSET(Lookup_MoistCondition,,2,1), E1) &
INDEX(OFFSET(Lookup_MoistCondition,,3,1), E1) &
INDEX(OFFSET(Lookup_MoistCondition,,6,1), E1)


Now, the question is, can you define a method for us to select which columns
should be chosen? If you can put it in words, we may be able to refine the
formula further.

HTH
Steve D.


"patrick barbour" / wrote in message
...
Thanks for trying to wade through this long post, Roger! -) I realize
it's pretty durned confusing, but it wouldn't be B1 in the second Vlookup
the way I'm doing it. The columns I need to pull from change every row(!).
The idea is that I'm pulling all the formula parts based only on whether
Wet or Dry is chosen in column A. (It's pretty clunky.
)


I check on Wet/Dry and then go to the lookup table to see which column I
should be grabbing first in the main worksheet. I then use that same
Wet/Dry choice to go back to the lookup table and find out what the second
column is that I should be grabbing from the main worksheet, etc. This is
because depending on what the user chooses in column A, I could be pulling
columns B, C, F and Q or maybe a completely different set, like C, F, L,
S, U and Z!

I guess what I'm saying is that in an ideal world I could just check on
Wet/Dry and then do one single lookup to return the correct formula text,
e.g., 'B1&C1&F1&Q1'. I could then turn this text into a formula after
updating the row # to reflect the actual row I was on (with Offset, or
whatever). Again, thanks. --patrick


---
frmsrcurl:
http://msgroups.net/microsoft.public...store-formulas