Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Apr 3, 8:09*pm, RemyMaza wrote:
On Apr 3, 6:45*pm, JLGWhiz wrote: For B1 do you have 42 variables or a variable with 42 possible values? *Makes a big difference. Here's the breakdown: C2 - 3 variables D2 - 42 variables So it looks like 3*42... *Each variable in C2 has 42 variables. I need to input C2 and D2 and come up with a value in another cell based on those variables... *Here's what I have so far, but I can't get past the first variable in A1... I mean if I put a 1 in A1, it works fine, but I need the formula to continue if A1 equal 2 or 3... The working code I have so far is: =IF(C2=$K$1,VLOOKUP(D2,J2:K43,2,FALSE)) To make is simple K1 on this formula is only a number above my array. This way I know which array I'm dealing with. *If there is a more efficient way, I'm not binded to this formula. *I have 3 total arrays that I need to lookup based on the first input i.e. =IF(C2= *So if C2 equals something other than 1 it will lookup in a different array. The formula above works great but when I try to expand it to the three arrays, I end up with a formula that looks like: =IF(C2=$K $1,VLOOKUP(D2,J2:K43,2,FALSE)*IF(C2=O1,VLOOKUP(D2, N2:O43,2,FALSE)*IF(C2=S1,*VLOOKUP(R2:S43,2,FALSE)) )) This sadly doesn't work in excel and I'm not sure how to fix the formula to look past the first variable if it changes. Thanks for any help... Matt I just scrapped the 3 array approach. I took C2 input and added a number to it that would offset it farther down the array. I combined all three arrays into one, so with this new input it would look throughout 1 array but farther down if C2 = 2 or if C2 = 3.... Worked like a charm... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Call macro stored in Excel workbook from Outlook's macro | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming | |||
Excel Macro Issue Trying to autorun Macro Upon Opening Worksheet | Excel Programming |