# Calculate numbers from given data

1. ## Calculate numbers from given data

Hello All
I am using excel 2007,on the attached worksheet I have 3 cols of data in cols L,O,Q the values of which will determine the numerical values in cols AX & AY.eg If L5 = LST & O5 = 1 & Q = CHS then AX5 & AY5 will have
values of 101 & 148 respectively.Is it possible to use a formula or macro to produce the values in AX & AY.The
rows can be over 500 long.I have left an empty row between data types for illustration only,there are no empty rows in the data.
Many thanks for help given.

2. ## Re: Calculate numbers from given data

I'm sure there is a formula or macro that will produce the values in AX and AY. However, it will be impossible for us to help you build that formula/macro without a good understanding of the logic or math or process that allows you to go from the input values to the output values. Can you explain in detail how you get 101 and 148 from those inputs?

3. ## Re: Calculate numbers from given data

The values in AX & AY are fixed,IF L2 = GR1 AND O2 =1 AND Q2 = CHS then AX2 and AY2 will appear as 106 & 169.I have tried to construct a formula
using nested IF functions with no success.
Thanks again.

4. ## Re: Calculate numbers from given data

Considering there are three input variables and who knows how many possible values for each input variable, yes, nested IF() functions would be large, unwieldy, and difficult to impossible.

I'm not sure I understand what you mean by "Ax and AY are fixed"? It sounds to me like AX and AY change depending on what values are put into L, O, and Q?

If there is no logic or reasoning that can be used to determine AX and AY, you may need to resort to a lookup table of some kind. http://office.microsoft.com/en-us/ex...011.aspx?CTT=1 You could concatenate the three text strings together, then use that in a lookup function to search a lookup table for that combination and return the desired values. I don't know how many different combinations there are, but I expect that there will be some effort in putting the lookup table together.

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1