Author Topic: referencing and setting values in EXCEL  (Read 382 times)

Tags:
  • All members
  • Posts: 301
  • Karma: +1/-0
referencing and setting values in EXCEL
« on: 23 Jul 2021, 14:26 »
Hi, I have setup excel in my profile, and I use a single sheet to add/update values, at market settle.

I am trying to show the profit/loss made at each step, and I wish to write this to a new row cell every time the market settles.

So, for example, the first bet wins £2, I wish to place this at Cell C2, next bet loses, I now wish to place that value in cell C3

I have set a count cell elsewhere, at H2, which indicates =SUMPRODUCT(MAX((C2:C20000 <>"")*ROW(C2:C20000))) + 1, which, in short gives me the last empty row/cell. I wish to use this in my logging trigger, and I use a 'write to excel' action in the trigger, and have attempted to give the Cell Address as data!C + cell_data_H2, but of course this is not working.

I am not sure of the syntax of doing this as the documentation is very limited on excel

Any help is appreciated

Thanks

  • Moderator
  • Posts: 3353
  • Karma: +278/-0
*
Re: referencing and setting values in EXCEL
« Reply #1 on: 23 Jul 2021, 15:05 »
Hi
This trigger demonstrates how to write data to consecutive Excel rows with a trigger. Should be easily modified for your purpose.   
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 301
  • Karma: +1/-0
Re: referencing and setting values in EXCEL
« Reply #2 on: 23 Jul 2021, 15:22 »
Thanks MarkV, perfect!

to reference the Cell Address : data!C(cell_data_H2)
if wanting to read/use the data : cell_data_C(cell_data_H2)

  • Moderator
  • Posts: 3353
  • Karma: +278/-0
*
Re: referencing and setting values in EXCEL
« Reply #3 on: 23 Jul 2021, 15:39 »
an even easier way to write to consecutive rows:
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.