IF Statement

Deonvg

New Member
Joined
Feb 4, 2010
Messages
27
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I have the following table with data and it references against a "lookup" table (column K:L).

Somehow I need to combine a IF formula to do all the of the below, have tried doing it with "OR & AND", but just don't seem to be getting it correct. Pending on the combination of Country in "lookup table" & column A it needs to bring back Foreign

Your help would be appreciated.

Thanks in advance.(sorry can't install proper paste tool for excel as i'm on my work laptop)

ABCDEFGHIJKLM
1
2Type of incomeCountry of source of incomeUSDLookup table
3Royalty feeBotswana5000=IF(A2="Royalty Fee", "Foreign","Local")Royalty feeBotswana
4ClientSwaziland10000=IF(A3="Client", "Foreign","Local")ClientSwaziland
5Franchise feeLesotho4500=IF(A4="Franchise Fee", "Foreign","Local")Franchise feeLesotho
6InterestUganda3000=IF(A5="Interest", "Foreign","Local")InterestUganda
7IT ChangeGhana1000=IF(A6="IT Change", "Local","Foreign")IT ChangeGhana
8CommissionZambia500=IF(A7="Commission", "Local","Foreign")CommissionZambia
9But / OR
10=IF(OR(A7&B7=$L$7&$M$7,A8&B8=$L$8&$M$8,A8&B8=$L$8&$M$3),"Foreign","Local")
11
12

<tbody>
</tbody>
Sheet1
 
Last edited:

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Instead of a long nested IF statement, you could set up a VLOOKUP table and use that, which would be easier
 
Upvote 0
Instead of a long nested IF statement, you could set up a VLOOKUP table and use that, which would be easier

I would still have to create some kind of unique identifier to bring in the variable of last 2 income types. If any of those 2 income types match with any of the countries in column "L" I want a value of "Foreign" to be returned, but if the income type and country doesn't match it should be local.

If the income type for the last 2 doesn't match with a certain country it should be local, thus the amount of unique identifiers would increase quite drastically

Income types form A3:A6 should immediately give me Foreign.
 
Upvote 0
Try this.
=IF(((A3="IT Change")+(A3="Commission"))*ISNUMBER(MATCH(B3,$L$3:$L$8,0)), "Local", "Foreign")

Or this, using AND and OR.
=IF(AND(OR(A3="IT Change",A3="Commission"),ISNUMBER(MATCH(B3,$L$3:$L$8,0))), "Local", "Foreign")
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,749
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top