Robot skipping current year input when prior year has a value

Hi, I am doing a financial statement using data from Word and exporting it into Excel and currently trying to input empty cells with 0s. The PY and CY are columns beside one another. However, when PY has a value, UiPath skips the CY value, but if the current year has a value, the prior year will work (there will be an input of 0). I am using read range and if function. How do I format such that CY will have 0 when PY has a value?

if not PY = “” then CY = 0 ?

Depending on the datatype of PY you may need another check (not PY=0, not PY is nothing etc…)

if the PY cell has a value, and the CY beside it doesn’t, I want the robot to put a “0”, but it doesn’t. However, when the CY cell has a value but the PY beside it doesn’t, the robot manages to put a “0”.