IF Statement

Deonvg

New Member
Joined
Feb 4, 2010
Messages
20
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:

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,334
Instead of a long nested IF statement, you could set up a VLOOKUP table and use that, which would be easier
 

Deonvg

New Member
Joined
Feb 4, 2010
Messages
20
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.
 

thisoldman

Well-known Member
Joined
Jan 5, 2014
Messages
1,073
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")
 

Forum statistics

Threads
1,082,323
Messages
5,364,579
Members
400,809
Latest member
formulasataglance

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top