![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Posts: 222
|
if i am doing a vlookup -- how can i prevent an error from showing, i would be happy with a dash in its place.
thanks rich [ This Message was edited by: richiejjj on 2002-03-25 05:47 ] |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Leiden, The Netherlands
Posts: 68
|
You might try:
=IF(ISNA(VLOOKUP(whatever));"-";VLOOKUP(whatever)) I don't know of any way to format errors. marc |
|
|
|
|
|
#3 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Bogota, Colombia
Posts: 11,927
|
I would suggest this instead:
If your current formula looks something like: =VLOOKUP(A1,$C$1:$E$100,3,0) replace it with =IF(COUNTIF($C$1:$C$100,A1),VLOOKUP(A1,$C$1:$E$100,3,0),"") |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Posts: 222
|
excellent thank you
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Posts: 222
|
further to the earlier question , how can i adapt this to not show results of formulaes that would produce an error:
i.e. #DIV/0! thanks |
|
|
|
|
|
#6 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Millbank, London, UK
Posts: 1,790
|
you should be able to tailor the =error.type function to your requirements where you only want to "hide" or "replace" certain types of errors
check out the help file on error types
__________________
:: Pharma Z - Family drugstore :: |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=IF(B1,A1/B1,0) where B1 is of numeric type, is better than just: =A1/B1 which will give #DIV/0! if B1 can be 0 or empty. |
|
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Feb 2002
Posts: 222
|
great thanks!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|