Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Office > Excel

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-05-2009, 03:54 AM
Novice
 
Join Date: Mar 2009
Posts: 1
bunnygum is on a distinguished road
Default Vlookup and If statement problem

Hi,

I am having trouble with the syntax for this.

=VLOOKUP(B20, SpanCatForce,
IF(AND(C20="4%"), 2,
IF(AND(C20="5%"), 3,
IF(AND(C20="6%"), 4,
IF(AND(C20="7%"), 5,
IF(AND(C20="8%"), 6,
IF(AND(C20="9%"), 7,
IF(AND(C20="10%"), 8,
IF(AND(C20="11%"), 9,
IF(AND(C20="12%"), 10,
IF(AND(C20="13%"), 11,
IF(AND(C20="14%"), 12,"check"))))))))))))

I am trying to look up data in multiple columns where B20 contains the line value and C 20 determines which column to use

Any assistence would be appreciated
Peter
Reply With Quote
  #2  
Old 03-24-2009, 08:10 AM
db2 db2 is offline
Novice
 
Join Date: Mar 2009
Posts: 2
db2 is on a distinguished road
Default

Peter,

The AND statements in each of your nested IF's are not required as you only have one statement to check in C20. Remove these and try again e.g. [ IF(C20="4%", 2, ], let me know if this solves your problem.

Regards,

David
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup question Tony G Excel 9 03-29-2009 02:16 AM


All times are GMT -4. The time now is 04:05 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.