VBA and #N/A

R

rvExcelNewTip

I can check whether a cell has a value of #N/A by using
WorksheetFunction.IsNa(CellAddress).

-But can I put a #N/A value into a cell?- There seems to be no
equivalent of the
NA() function that you can use directly in a worksheet. Something
like
Range(CellAddress).Value=NA() ???

Putting the string equivalent "#N/A" into the cell doesn't help,
because the spreadsheet has to function in a multilanguage environment.
 
D

Dave Peterson

Maybe you could try:

with range(celladdress)
.formula = "=na()"
.value = .value
end with

But I bet this would work, too:

range(celladdress).value = cverr(xlerrna)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top