Write Cell: Object reference not set to an instance of an object. Error

@HENG_JUN_YING_AARON

You can use cdate(yourdate).ToString("MM/dd/yyyy 00:00:00) and try to use in lookup

Cheers

@HENG_JUN_YING_AARON ,

After Checking the Excel Cells, the representation or the date value itself is different :

So the value that you should use for the lookup range activity should be the below :

30-04-2023

Could you check and let us know if you’re able to get it to work ?

Also, It seems that all the dates are having the last day date representation. So we can have dynamically prepare the Month value like below :

CDate(Month).AddMonths(1).AddDays(-1).ToString("dd-MM-yyyy")

Hi @Anil_G @supermanPunch , after messing around with the lookup value this was the one that got the lookup working.

image

I’m not sure why this would be the case, but it works so thanks to both of you for guiding me up till now

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.