I'm trying to create was it a very complicated CONCATENATE function that also uses LOOKUP, and which creates a short, simple sentence. I quickly realised that there aren't enough nested IF statements for what I want, so I tried creating Macro code to demonstrate what I want to do.
I'm trying to create a sentence which describes how a Gross Wage figure was calculated. There are a few ways that this can be done:
1 - a wage figure can be entered in "INC" directly. I haven't actually allowed for this yet, but in this situation, the user would have to describe themselves how they worked it out
2 - various wage figures can be entered into "1 JOB WAGE CALC", and either the latest figure would be used (and put into "INC"), or the average would be taken (and put into "INC")
3 - various wage figures can be entered into "2 JOB WAGE CALC" (in one of two tables), and either the latest figure would be used (and put into "INC"), or the average would be taken (and put into "INC")
The code is then supposed to create a sentence like:
"Gross Wage - £500/month - most recent figure used"
"Gross Wage - £500/month - calculated as average of £400, £600, £200, £800"
There are a few bits I'm not sure on, like how to combine LOOKUP with CONCATENATE, and the odd reference might be wrong at the moment, but for now this is what I have:
EDIT: Sorry, I thought there might be a way to preserve the formatting when I posted the code (as mine has indents). Is there a way to do that?
Bookmarks