# Support Board

Date/Time: Thu, 27 Feb 2020 04:09:12 +0000

## [Programming Help] - SpreadSheets - Referencing 'Last Entry Trade DateTime' (Cell J42)

 [2020-01-16 00:08:37] #1 a Gem Tree - Posts: 38 | Ending Date: 2020-03-11 I would like to reference the bar (see: row) at which my last trade entry was taken. I believe Cell J42 can be used for this, but I'm not sure how. Would I need to convert the data in J42 into fractime to do this? Or can I directly compare the J42 data to the data in Column A? If Sierra has a page detailing this process, or something similar, can you please link me? OR, if you have the patience and time, perhaps just list the steps I'll need to take to get the reference to this (trade entry) Bar?
 [2020-01-16 01:47:14] #2 tomgilb - Posts: 2384 | Ending Date: 2020-02-29 Would I need to convert the data in J42 into fractime to do this? No. The FRACTIME function removes the date from DateTime value and leaves only the time. If you use FRACTIME, it would be true every day at the time/row where the entry time occurred. can I directly compare the J42 data to the data in Column A? Yes. Use this formula in a Formula Column: =IF(ROW()=3,AND(\$J\$42>A3,\$J\$42<\$J\$41),AND(\$J\$42>A3,\$J\$42
 [2020-01-16 03:22:49] #3 a Gem Tree - Posts: 38 | Ending Date: 2020-03-11 Thank you Tom - I kinda wrote my own stuff, cus I just don't understand the code above. So for anyone searching google for this stuff, here's a very simple solution, but one that uses 2 columns: Column 1: - Written in Column S... =AND(A3>\$J\$42) Column 2: =IF(AND(S3=1,S4=0), (INSERT your own function) ,0) Note that, the column you are interested in, will be the 5th row. So, if you want the last price of your trade entry bar, you must type, E5, in the 3rd row. This means that you will not be able to reference the entry bar until 2 bars later. But if you guys have a better solution as to how to write it, let me know.