If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > MS Excell - Nested If issue -Amateur

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-05-09, 11:17
Simplify Simplify is offline
Registered User
 
Join Date: Oct 2009
Posts: 6
MS Excell - Nested If issue -Amateur

I am looking for a solution for nested If's
My formulae is working, but does not assign the right values..

I am working with cells containing Zip Codes of different countries.
I have a more detailed zip codes metrics for France, Germany and UK with more defined zones.

I dont want to filter out any countries while conditioning the 3 countries and their zip codes, so should I have Spain among Germany, formulae should avoid Spain Zip Code//

Well the best I could come up with is : the zip code has to fit the ranges, if it doesnt - return the value:

=IF(AND($I3>=$C$3,I3<=$D$19),"FRANCE I",IF(AND(I3>=$C$20,I3<=$D$37),"FRANCE II",IF(AND(I3>=$C$39,I3<=$D$142),"UK I",IF(AND(I3>=$C$143,I3<=$D$160),"UK II",IF(AND(I3>=$C$161,I3<=$D$167),"GERMANY I",IF(AND(I3>=$C$168,I3<=$D$175),"GERMANY II",H3))))))


But, I have Lithuania being returned as UK I which is incorrect...Lithuania zip code LV-4100 does not fit into the metrics so it should have been returned.
( i cant attach xls file so i have pasted the metrics in the word..)

The problem here must be with the formats of Zip codes I am working with? Any ideas?
Attached Files
File Type: doc Country zip codes.doc (157.0 KB, 74 views)

Last edited by Simplify; 10-05-09 at 11:22.
Reply With Quote
  #2 (permalink)  
Old 10-06-09, 03:43
Simplify Simplify is offline
Registered User
 
Join Date: Oct 2009
Posts: 6
Smile Uploaded sample

I have had better luck with uploading the sample of the worksheet, this may help?
Attached Files
File Type: zip ZIP CODE_CNTR CODE.zip (996.3 KB, 0 views)
Reply With Quote
  #3 (permalink)  
Old 10-06-09, 05:40
Simplify Simplify is offline
Registered User
 
Join Date: Oct 2009
Posts: 6
Solved the issue

I have solved the problem by going around it..not super happy, bt it works.
Reply With Quote
Reply

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