Lookup limits?

D

DennisG

My object is to automate a form report of pre worded
statements generated from a code that selects “YOU HAVE”
statements # 1-27 and “WE RECOMMEND” statements # 28-62
from “Table1” displayed in cells to be merged in a table
named “Data”
I am using excel to be the data source document and every
thing seems to work until statement # 30 then excel
repeats statement #31 over and over regardless of the
code number above #27 entered.
Excel sheet “Table1” is numbered consecutively 1 to 62.
Sheet "Data" contains the formula for the “YOU HAVE”
statements 1-27: =IF(AND(U2>0,U2<28),VLOOKUP
(U2,Table1,2)””) this works fine.
The second formula that is giving me fits for the “WE
RECOMMEND” statements #28-62 is:
=IF(AND(A12>27,A12<63)VLOOKUP(A12,Table1,2)””) this works
until statement #30 and then #31 is repeted.
 
B

BrianB

<<excel repeats statement>>

Do not fully understand what you are trying to do, but you are
probably in error with your formula VLOOKUP(A12,Table1,2) which I
think should read :-
=VLOOKUP(A12,Table1,2,FALSE)

This version of the formula searches for the *exact* lookup value and
returns #N/A if not found.

The other version =VLOOKUP(A12,Table1,2,TRUE) - or with the final
argument omitted - will return the *nearest* match - which will
account for your repeats.


Regards
BrianB
================================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top