This is a small part of my web scraping code.
wb = xw.Book("jockeyclub.xlsx")
rc1 = wb.sheets['Race Card 1']
besttime = 7
rc1.range('S7').formula = f'=MIN(IF({besttime}1:{besttime}150<>"", {besttime}1:{besttime}150))'
rc1.range('AA7').formula = f'=MATCH(MIN(IF({besttime}1:{besttime}150<>"", {besttime}1:{besttime}150)), {besttime}1:{besttime}150, 0) + ROW({besttime}1) - 1'
it does print the following formulas in cells S7 and AA7, but it adds an "@" in the middle.
for cell S7, it prints
=MIN(IF(@BQ1:BQ150<>"", BQ1:BQ150))
for cell AA7, it prints
=MATCH(MIN(IF(@BQ1:BQ150<>"", BQ1:BQ150)), BQ1:BQ150, 0) + ROW(BQ1) - 1
The formulas are both not working due to the "@" in the middle. Why is it there and how can i get rid of it through code?