vlookup query

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows
hello folks

i was wondering if someone could give us a hand please

ive got this query
=VLOOKUP($A$4,'Line 1 '!$A$19:$K$59,5,FALSE)

$A$4 =xyz and the ,5, = 123 = result 123

the query works fine and does what i need it to do, but i want to make my sheet look pretty when the is nothing in A4

so if i have got xyz in A4, my result will be 123
if i have an empty cell in A4 i get #N/A


can i use conditional formatting with white text or somthing like that so it dosent show anything until somthing is in cellA4 ??????????
do you get what i mean


many thanks jason
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
How about

=IF(ISBLANK(A4),"",VLOOKUP($A$4,'Line 1 '!$A$19:$K$59,5,FALSE))
 

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows
you are a star

that worked fantastic.

can i just ask 1 more favour,

if i write somthing in cell A7 like joe bloggs can i also hide that if cell A4 is balnk??????

=IF(ISBLANK(A4)joe bloggs
 

VoG

Legend
Joined
Jun 19, 2002
Messages
63,650
Yes, it is quite general:

=IF(ISBLANK(A4),"","joe bloggs")
 

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

TOP BANANA

many thanks
 

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows
sorry last one to clear the sheet

ive got in cell A8 (=C4/A7) result = #VALUE!


C4 is blank
A7 is =IF(ISBLANK(C4),"",VLOOKUP($A$4,'Line 1 '!$A$19:$K$59,11,FALSE))


whats your thoughts so i can clear the #VALUE!, or white the text out untill C4 has got somthing in it.............

many thanks
 

tony0682

Board Regular
Joined
May 19, 2005
Messages
164

ADVERTISEMENT

Can use the same ISBLANK formula again

A8 = IF(ISBLANK(C4),"",C4/A7)
 

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows
sorry didnt work for me!!!!!!!!!

=IF(ISBLANK(C4),"",C4/A7)

just leaves =IF(ISBLANK(C4),"", in the cell


mmmmmmmmmmmmmmmmmmm
 

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows
sorry my fault, i had a space b4 the =


thanks for your help
 

j4ymf

Well-known Member
Joined
Apr 28, 2003
Messages
647
Office Version
  1. 365
Platform
  1. Windows
hello again

from last nights help i got this to work
Code:
=IF(ISBLANK(A26),"",VLOOKUP(A26,'Line 2'!$A$19:$I$28,3,FALSE))

so if A26 is blank it will leave the cell empty that works fine. and the sheet looking neat.

so what do i need to do to this one then?
Code:
=IF(ISNA(VLOOKUP($A$31,'Line 3 Cat - Export Dog'!$A$22:$I$45,3,FALSE)),VLOOKUP($A$31,'Line 3'!A30:I81,3,FALSE),VLOOKUP($A$31,'Line 3 Cat - Export Dog'!$A$22:$I$45,3,FALSE))


when A31 is empty it leaves #N/A as b4

thanks jason
 

Forum statistics

Threads
1,136,878
Messages
5,678,326
Members
419,756
Latest member
vincent86kapelski

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top