Selasa, 16 Agustus 2011

[ExcelVBA] Re: Excel VLookup - doesn't work

 

The vlookup should work fine as written. Two things to condsider.
1. Try sorting the data in ascending order by column a on both sheets.
2. Ensure that your (ID) values are all formatted the same. I.e. all numbers/general/text etc. Sometimes values will be formatted as general as seen in the format | cell menu but will actually be text. This is usually indicated by a green triangle in the top left (or right) corner of the cells, if you hover over that cell the message in the balloon will say "number formatted as text". Excel will not match values that are not formatted the same even if they are indeed the same.

--- In ExcelVBA@yahoogroups.com, "sheizageek" <sheizageek@...> wrote:
>
> I have two worksheets. Each has multiple columns, but the same column A (ID) and Column C (Claim#). The first worksheet has 324 records and the second worksheet has 10,248 records. I want to search for each claim # in sheet1 to see if it exists in sheet2, and, if so, tell me the ID of the second sheet. This is the formula that I used, but I only get the #N/A error in every cell. =VLOOKUP(C2,sheet2!$A$2:$C$10248,3,FALSE)
>
> I know that there are matches, but it doesn't show anything but the error.
>
> Is this formula wrong? Does VLOOKUP search multiple worksheets/workbooks? Should I do this using VBA instead? If so, what code?
>
> Any assistance is appreciated.
>
> Sharron Puryear
>

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar