I'm trying to use a formula in Excel using Python and the OpenPyXL library. The aim is to output the following into an excel cell.
=SMALL(IF(G4:BI4>BJ4,G4:BI4),1)
However, when I output the above in excel, the end result has an '@' symbol.
=SMALL(IF(@G4:BI4>BJ4,G4:BI4),1)
The code I'm using is as follows:
col_num += 1
cell = worksheet.cell(row=row_num, column=col_num)
cell.value = f"=SMALL(IF({var_first}:{var_last}>{lowest_offer_cell},{var_first}:{var_last}),1)"
How do I get rid of the '@' symbol and get the correct output?