ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Vlookup, several tables, one sheet (https://www.excelbanter.com/excel-programming/410763-vlookup-several-tables-one-sheet.html)

ALS

Vlookup, several tables, one sheet
 
Hi All,

I've used the Vlookup, Match and Offset to find and format the font of a
value in a cell in one table. This all works well on one table, when the
value exists in the table.

If the value I'm looking for does not exist, it displays the #N/A in the
cell holding the value, so I get a runtime error 13, type mismatch. The
OnError handles this just fine when used on one table only.

The Problem: The Worksheet is updated on a monthly basis with changing
ascending values that stop and reset at 1,000,000, some tables have it and
other do not. There are seven tables, having equal amounts of rows, and when
I try to move from the first table to the second, I get a duplicate error for
the OnError command.

How do I handle this error when the value doesn't exist? Eventually this
1,000,000 value will appear in each table.

Is there a value associated with the #N/A that I can use in an IF statement?

Thanks for any light you can shed on the subject,
Al


Neptune Dinosaur

Vlookup, several tables, one sheet
 
G'day

"IsError(ActiveCell.Value)" will return a Boolean (True or False) according
to whether the active cell contains a worksheet error. You may be using
something other than "ActiveCell.Value" in your code, but the principle is
the same.

If iserror(activecell.value = True then
do something

end if
--
Time is just the thing that keeps everything from happening all at once


"AlS" wrote:

Hi All,

I've used the Vlookup, Match and Offset to find and format the font of a
value in a cell in one table. This all works well on one table, when the
value exists in the table.

If the value I'm looking for does not exist, it displays the #N/A in the
cell holding the value, so I get a runtime error 13, type mismatch. The
OnError handles this just fine when used on one table only.

The Problem: The Worksheet is updated on a monthly basis with changing
ascending values that stop and reset at 1,000,000, some tables have it and
other do not. There are seven tables, having equal amounts of rows, and when
I try to move from the first table to the second, I get a duplicate error for
the OnError command.

How do I handle this error when the value doesn't exist? Eventually this
1,000,000 value will appear in each table.

Is there a value associated with the #N/A that I can use in an IF statement?

Thanks for any light you can shed on the subject,
Al



All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com