ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Lookup help (simple) (https://www.excelbanter.com/excel-worksheet-functions/67271-lookup-help-simple.html)

Boggis2000

Lookup help (simple)
 
Hello all,

I am using the Lookup function in my workbook sucessfully but want to make
the code slightly more streamlined. The code is as follows:

=LOOKUP(C$1,Main!B2:B1000,Main!K2:K1000)

The idea is to lookup the value in cell C1 in column B on another sheet and
load the corresponding value from column K. The problem is that it only
looks in the first 1000 rows and not the whole column. I probably won't need
more than a 100 entries, or I could change it to a higher value, but I was
wondering if it could just search the whole column or is that not possible?

Many thanks

Andy Baldwin

Pete

Lookup help (simple)
 
You need to amend your formula slightly:

=LOOKUP(C1,Main!B2:K1000,10,0)

You can make the "1000" after the K as large as 65536 if you want to
look at the whole column.

Hope this helps.

Pete


Pete

Lookup help (simple)
 
Sorry Andy, I thought this was VLOOKUP - please ignore.

Pete


Bob Phillips

Lookup help (simple)
 
=LOOKUP(C$1,Main!B:B,Main!K:K)


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Boggis2000" wrote in message
...
Hello all,

I am using the Lookup function in my workbook sucessfully but want to make
the code slightly more streamlined. The code is as follows:

=LOOKUP(C$1,Main!B2:B1000,Main!K2:K1000)

The idea is to lookup the value in cell C1 in column B on another sheet

and
load the corresponding value from column K. The problem is that it only
looks in the first 1000 rows and not the whole column. I probably won't

need
more than a 100 entries, or I could change it to a higher value, but I was
wondering if it could just search the whole column or is that not

possible?

Many thanks

Andy Baldwin




Boggis2000

Lookup help (simple)
 
Thanks, I knew it would be simple!

"Bob Phillips" wrote:

=LOOKUP(C$1,Main!B:B,Main!K:K)


--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Boggis2000" wrote in message
...
Hello all,

I am using the Lookup function in my workbook sucessfully but want to make
the code slightly more streamlined. The code is as follows:

=LOOKUP(C$1,Main!B2:B1000,Main!K2:K1000)

The idea is to lookup the value in cell C1 in column B on another sheet

and
load the corresponding value from column K. The problem is that it only
looks in the first 1000 rows and not the whole column. I probably won't

need
more than a 100 entries, or I could change it to a higher value, but I was
wondering if it could just search the whole column or is that not

possible?

Many thanks

Andy Baldwin






All times are GMT +1. The time now is 05:54 PM.

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