• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Excel help...

  • Thread starter Thread starter So
  • Start date Start date

So

Lifer
So, I?m trying to make a sheet where I compute the following type of equation:


Written in pseudo code for easy understanding...

Find Z, given X, Y

If Y = GR
{
If X < 80, Z = X
If X > 80, Z = X / 40
}
If Y = LDR
{
If X < 22, Z = X
If 22 < X < 92, Z = X /11, and Z is no more than 5
If X >= 92, Z = X * .6 /11
}

And so on?

Using a lookup table, I?ve generated the outer part, but I?m at a loss as to the inner part. Especially because it needs a reverse lookup of sorts...
 
I put together a quick and dirty sample Function for use in excel, based on your pseducode.

You could modify it as needed...but it might get you pointed in the right direction.

To use it, you need to
- Tools -> Macros -> Visual Basic Editor

Once in the VBE
- Right Click in the Project - VBAProject window (usually upper left)
- Select: Insert -> Module
- Double click on the new module (if it doesn't automatically open)
- type code into the module

Then you can reference the function like any other Excel function:
=MyValue(C3,C5)
 
Wow, thanks! Looks like that pretty much covers what I need. I am in your debt.

:beer:😎
 
Back
Top