Try using IFERROR function like this:
=IFERROR(IF(VLOOKUP(D26,'DB-Lot Status'!B:H,7,FALSE)="1","M",""),"")
Perhaps you need to remove the quotes from the "1"
The Text String "1" is NOT the same as the Number 1
=IFERROR(IF(VLOOKUP(D26,'DB-Lot Status'!B:H,7,FALSE)=1,"M",""),"")