Hi Oxa,
I bet through an Excel spreadsheet, and I have a query on applying a formula in the conditions of a trigger.
My spreadsheet is set up through a trigger which uses the "Write to Excel" command and it looks like this:
Col A Col B Col C Col D Col E Col FHorse Name Horse Name Price Rank1 Rank2 Bet Amt
"Royal Symphony" Royal Symphony $2.50 2 1 $5.00
"Harmony" Harmony $5.00 1 2 $2.50
Full list for the race follows down the columns in consecutive rows.
[I need to show the horse name without "" (Column B) as I keep records in another sheet which only recognises the name without the inverted commas.]
The trigger I am trying to write places dutch bets on horses where rank1 and rank2 are equal to 1 (the top ranked horse).
In the trigger conditions, I think I need to use a VLOOKUP to identify the ranks by horse.
For example, AND Selections Trigger Expression VLOOKUP("sel_name",SheetName!$A$2:$E$500,4,FALSE) is equal to 1
OR Selections Trigger Expression VLOOKUP("sel_name",SheetName!$A$2:$E$500,5,FALSE) is equal to 1
BUT I am unsure of the MFP convention for writing a formula like this into a trigger.
My queries are:
Do I put an "=" sign before the VLOOKUP function?
Do I need to have sel_name in inverted commas?
Do I need to use Column A (name in inverted commas) or Column B (no inverted commas) in the VLOOKUP expression?
Is a VLOOKUP function valid in a trigger condition?
Is there a simpler way of doing this?
In addition, and for any trigger I might need in the future along the same lines, what is the convention for a VLOOKUP in the amount field? Is a VLOOKUP even valid in that field?
For example, can I refer to a VLOOKUP in the amount field as follows:
VLOOKUP(sel_name,
horse_sheet!A2:E500,6,FALSE).
Same queries as above still apply.
Could you advise the correct formula conventions please.
Your assistance is much appreciated.
Regards,
bobh