Getting a cell value from query and need to check if it exist or not

Need help with Do while but not sure this is a good one for this automations.
Im getting a informations from query and need to check if in cell d3 shows any value or not.
I did do while and inside element exist for clear cell and cell with value but it always goes with the option where is value.

Thank you!


Are you trying to do UI Automation in excel?

if yes then please dont do that…instead use read range or so to get the data and please use filters etc