IF is one of the most popular and useful functions in Excel. Generally, you use an IF statement to test a condition and to return one value if the condition is met, and another value if the condition is not met. Continue reading
by Svetlana Cheusheva, updated on
IF is one of the most popular and useful functions in Excel. Generally, you use an IF statement to test a condition and to return one value if the condition is met, and another value if the condition is not met. Continue reading
Comments page 19. Total comments: 2999
Hi Svetlana,
I was wondering if you could help me out? I'm trying to update a formula in a cell which takes information from a set of cells which, in turn are subject to information from another set of cells.
E.g.
A1 Apples C1 Bananas
A2 Oranges C2 Plums
A3 Pears C3 Peaches
One of A1, A2, A3 will populate A4 depending on information in cells B1-B3 (say highest number), likewise C4 from C1-C3 depending on information from cells D1-D3.
I'm trying to write a formula in A6 based on the data from A4 and C4 again depending on which has the highest number in cells B4 and D4. The formula is something along the lines of =IF(AND(B4>D4),"data from A4", "data from C4").
As the information in cells A4, and C4 are subject to data from cells A1, A2, A3, B1, B2 & B3 and C1, C2, C3, D1, D2, & D3 respectively while A6 is subject to data from A4, B4, C4 & D4, how do I create the formula in A6 which takes in the data which is subject to change as opposed to any text e.g. "data from A4"?
If you can follow all of that I would appreciate any help you can give.
Thank you in advance,
Darren
Hi Darren,
If your task is to return the number from A4 if the number in B4 is larger than the number in D4, and otherwise return the number from C4, then you can use the following formula in A6:
=IF(B4>D4,A4,C4)
how can solve this problem
if 200 captured 4, 600 captured 8,& 1000 captured 10
pl. give the correct link
Hi,
use this below formula, I have taken 200, 600, 1000 in Column "A"
=IF(A1=200,"4",IF(A1=600,"8",IF(A1=1000,"10","")))
Hi Hemanth,
thanks for info.
but we need if any value is less than 200 it's captured "4"
if its 400 to 599 its captured "6" & it's 600 or above then itwill be captured "10"
Pl help
Hi,
=IF(AND(J10>0,J10=400,J10=600,"10","")))
=IF(AND(A7>=5.5,A7=5.5 and <=13
true = A7-0.5
false= if A7<5.5 true A7 False A7-1.
Please help me!
Hi Grissy,
Here you go:
=IF(AND(A7>=5.5, A7<=13), A7-0.5, IF(A7<5.5, A7, A7-1))
Hi Svetlana,
there is a 9 figure number and a character(ex. 7730082766V) in a1. what I want is if the 3rd number of that number less than or equal 3, print "male" or if it is bigger than or equal 5, print "female" in b2. i tried with =if(mid(a1,3,1)<=3,"male","female") formula in b2. but it doesn't work. help me.
Hi Chaminda,
The point is the MID function always returns a text string, even if the original value is a number. You can simply multiply the result by 1 to convert it back to number, like this:
=IF(MID(A1,3,1)*1<=3,"male","female")
Alternatively, you can use the NUMBERVALUE function:
=IF(NUMBERVALUE(MID(A1,3,1))<=3,"male","female")
Hello there
Can anyone help me with this function, please: =IF(14<D9<17),"15"
I need that the cell takes the value of number "15" if the value from the equation in "D9" is between 14 and 17.
Thanks in advance
Hello!
Here you go:
=IF(AND(D9>14, D9<17), 15, "")
Dear all
Please tell me formula for
If sheet1 cell A1 dated match with sheet 2 date's column A:A
Ans will Sheet1 B1
Hi Ravi,
Use this formula in Sheet1 B1 cell.
=MATCH(A1,Sheet2!A1)
Hi Ravi
if its match will show "match" not match will show "blank cell"
=IF(MATCH(A1,Sheet2!A:A),"match","")
I have a question, can you help me please?
If I have multiple sheets, for example sheet1, sheet2, sheet3 and sheet4. And each sheet has 4 columns. The first one has a reference number , the second has an information , the third has a time , the forth has a date.
I want to put if statement, for example if i put reference number 25 in sheet4, I want it to do a search itself in the whole sheets and to copy whole the data from whole sheets & whole columns to this specific sheet
How???
can u help me ??
Hello Joe,
Most likely you need to use the combination of INDEX and MATCH functions, please see this blog post that describes how to work with them:
https://www.ablebits.com/office-addins-blog/excel-index-match-function-vlookup/
Hi.
In pivot table report I want to publish report in below format.
Opening stock,REceived qty,Issued qty,Closing stock
to get this report in pivot table, what should be the format of reference data.
Thanking you..
Hello,
Please see our blog post on pivot tables:
https://www.ablebits.com/office-addins-blog/excel-pivot-table-tutorial/
It describes how to organize the source data and arrange the layout of your pivot table.
Good day,
I can't get the border format to follow the cell I'm copying in value_if_true in the IF command.
=IF(C13="Description",C18,"") where C18 is a value with the darken top border.
Maybe it can't be done with the IF command but if so, I will appreciate any help in this matter. I have over 640 lines to correct and doing it by hand is time consuming.
I could probably write a macro...
Sincerely,
Robert
Hello Robert,
The only thing formulas can do is change the value of the cell where they are entered. If you need to change the format of the cell at the same time, please create a conditional formatting rule that will change its border or color the way you set. If you want to change the border of the cell if it contains the word "Description", you will need to use the following formula in your conditional formatting rule:
=C13="Description"
Hello,
assume i have written in one column 100(Cell A1), 200(Cell A2), 300(Cell A3), 400(Cell A4), 500(Cell A5), 600(Cell A6). I want to multiply these by 1.25 and display the values in the same cell. eg. Cell A1 is currently display 100. Once it is multiply, the value is 125. Then that value should appear in the cell A1 instead of 100.
Can someone support me.
Dinesh
Hello Dinesh,
Please see http://stackoverflow.com/questions/809725/whats-the-quickest-way-to-multiply-multiple-cells-by-another-number
Can you give me a formula for this? To get the current name... Cell A has name then the condition, if the the cell B is empty value Cell A, if the Cell C is empty value cell B, if the cell D is empty value cell C, otherwise value current cell. Thanks.
Hello Joram,
It sounds like you need the following formula:
=IF($B2="",$A2, IF($C2="",$B2, IF($D2="",$C2,XXX)))
XXX is the address of your current cell. However, it is better to avoid using the address of the cell where you enter the formula as XXX, please see this blog post for more details:
https://www.ablebits.com/office-addins-blog/circular-reference-excel/
dear madam,
i want to =if(c2"","completed","") please inform me to learning it.
WARM REGARDS,
NAVEEN.R
Hello Naveen,
Most likely you need the following formula:
=if(c2<>"","completed","")
You can learn how to work with the IF function from the blog post above.
I am working on a spreadsheet for a game challenge. I have a list of options: Baby, Child, Teen, Young Adult, Adult. The values are respectively: 0, 3, 16, 29, 49. I'm unsure how to write an IF function to add an option from the list's value + another cell that will be filled in. I think it should be =IF(A1="Baby", 0) But how would I put all the options in there? Basically, how would I make it so that whatever option is chosen, it would return the right value and then add it to the cell?
Hi Wolfy,
This can be done by using nested If functions, e.g.:
=IF(A1="Baby",0, IF(A1="Child",3, IF(A1="Teen",16, IF(A1="Young Adult",29, IF(A1="Adult",49,"")))))
Hello, I just ran into a problem with a formula i had help on before. I have 5 vehicles that i use in a spread sheet. i need a formula that will prevent from incorrect information because of odometer numbers running together. i use another spreadsheet with additional vehicles and the odometer readings are similar. =IF(C14>=174121, 15, IF(C14>=227425, 5, IF(C14>=208012, 21, IF(C14>=143916=72700, 9, 0)))))
#2 odometer is at 143916 #5 227425 #9 72749 #15 174121 #21 208012 Please help, thank you for your time, very much appreciated!
Hello, I believe I figured it out--- =IF(C33>=227425, 5, IF(C33>=208012, 21, IF(C33>=174121,15, IF(C33>=143916, 2, IF(C33>=72700, 9, 0))))) Formula in the correct sequence resolved problem, if incorrect, please let me know. Thank you
Reply
Yes, the updated formula is correct. Putting logical tests in the correct order is critical because as soon as the first condition is met, other logical tests are not checked.
Hi Svetlana. Thanks for the last reply, it was very helpful. However, I have a new problem I am struggling with.
I have a list of names in column A and B and I want see all identical names as "true" in column C. I have only managed to make an if-function which compare e.g. A2 with B2, but what I would like to do is to compare A2 with the whole range of names in column B. Something like =IF(A2=B2:$B$5626, TRUE). This does not work for me for some reason, do you know why?
Hi Andreas,
The IF function cannot compare ranges. I think you can use the following formula:
=IF(COUNTIF($B$2:$B$5626, $A2)>0, TRUE, "")
Please help, I need my formula to say if age is between 25-30 then its a certain cell, if its 31-40 than its another cell. how can I write it?
Hello Cristina,
You can write it in the following way:
=IF(B1<30,E1, IF(B1<40,E2,""))
Hello,
How can I assign a number to a text value and then add it?
Data Validation is present in A1, A2 & A3
Yes, No, Maybe are the values
I want to assign Yes=1, No=0; Maybe=.5 and then be able to add those values,
Example:
A1=Yes (1)
A2=No (0)
A3=Maybe (.5)
Total should be 1.5
Thank you in advance for your help!
Hello Michelle,
You need to add a column for the formula that will assign a number to the values in column A:
=IF(A1="Yes",1,IF(A1="No",0, IF(A1="Maybe",0.5,"")))
Copy it down the new column to get a number for each cell in column A. Then you can use the SUM function to add the values you get.
Светлана, would you be so kind to give me a hand on the following please? Assumption, in Sheet1 I have A1: toiletries ; A2: washing liquids A3: powders A4: toiletries; A5: conditioner etc. In Sheet2 I have B1: washing liquids; B2 powders, B3: shampoos; B4: toiletries; B5: shampoos etc. I Sheet2 I also have in C1: 213; C2: 325; C3: 564; C4: 912; C5: 487 etc.
My objective is: In cell F1 to have the following result -> If value in A1 (sheet1) matches value in B1 (sheet2), then return value from C1 (sheet2).
You help is very much appreciated. If you need more clarification on this matter please let me know. Зарание спасибо. Alex
Hi Alex,
If my understanding of the task is correct, you can use the following formula:
=IF(Sheet1!A1=Sheet2!B1, Sheet2!C1, "")
Светлана,thank you for your prompt response. Actually, I have realized the objective I have outlined is entirely incorrect. The actual output is: If VALUE in B1 matches the VALUE in the range A1:A5, then return the VALUE from C1. Correspondingly, when formula goes to B2 it has to check the range A1:A5 and if there is a match it returns the VALUE from C2.
Apologies for the confusion caused.
Светлана, no need to bother. I have managed to figure it out. Thank you anyway! Best Regards, Alex
Hi,
I need help trying to correct this formula.
=IF(OR(SUM(G8:R8)=0,(D7+F8),(SUM(G8:R8)0)),(D7-E8))
I am trying to have it read
if the sum of G8:R8 = 0 then add D7 + F8
if the sum of G8:R8 does not equal 0 then Subtract E8 from D7
However, it currently only Subtracts E8 from D7
Hello Karen,
You can use the following formula for your task:
=IF(SUM(G8:R8)=0,D7+F8,D7-E8)
Hi,
I am trying to use the IF formula, but need it to have more than two options, and I can't make it work. Please can you help?
e.g.
Grades are listed in Column B of the sheet. Then in column C I want to add the grade description.
If Column B = A, then I want column C to say Good.
If Column B = B, then I want column C to say Medium.
If Column B = C, then I want column C to say Bad.
When writing the formula please use cell B2 and C2 as the cells that the data is in. Thanks
Please can you advise the formula?
Hello Anna,
You can include several conditions in one formula the following way:
=IF(B2="A","Good", IF(B2="B","Medium", IF(B2="C","Bad","")))
You need to enter the formula in C2 and copy it down to apply it to the cells below as well.
Hi Carlos,
Explanation of the formula -
ROUND(VLOOKUP($O3,tbl_Premiums,5,FALSE)*(T3+U3+V3),0)
Refer to number in cell O3 for a the matching number in the table "premiums" column 5 and if it matches, multiply sum of Cells T3,U3 and V3. The end result to be rounded of to zero decimal points.
Thank you very much Ramki. I really appreciate you help
Hi,
If the cell A1 is more the 45 to add 15 and if A1 is less than 45 to times/multiply by 1.2
Please if anyone could kindly help which formula i would have to use
Many Thanks,
Abe
Hi Abe,
Here you go:
=IF(A1>45, A1+15, A1*1.2)
I'm working on Address Labels and want to save time on typing the zip codes. I want to say If Logan, 84321, If Smithfield, 84335, If Hyrum, 84319 I want to do If's for 6 towns. Any advice on how to do it?
Thanks
Hello Johnnie,
You can use a formula with nested IF function listing all 6 options, e.g. if the cities are in column A, it would look the following way:
=IF(A2="Logan",84321, IF(A2="Smithfield",84335, IF(A2="Hyrum",84319,"")))
Hi
i have 5 name and i am use if formula for phone number plz suggest
like
name is neeraj so number is 111 & select ravi so number is 2222
=IF(K2="Neeraj","1111","Number Required")
Hi,
Make separate column for name and Phone no.
Example : column F for names and column G for phone no. (You Can use any column for names and Phone no)
Use the below formula,if any column does not have phone no. but has name of the person. When your using this formula it will show as PHONE NO REQUIRED.
formula.
=IF(ISNA(VLOOKUP(A1,F:G,2,FALSE)),"phone no. requred",VLOOKUP(A1,F:G,2,FALSE))
Hello Swetlana,
I was wondering if you can help me translate this formula:
=IF(ISBLANK(C12),"",IF(ISNA(VLOOKUP(V12,tbl_PatternCode,6,FALSE)),"new",VLOOKUP(V12,tbl_PatternCode,6,FALSE)))
Hi Carlos,
1). its very simple range of column "c", Blank cell inside "c" column. it will show Blank only.
2). if data in "C" column cell ,"VLOOKUP" formula applicable (if "#N/A" will come it showing "NEW")
3). in "Vlookup" compare to "V12 column to tbl_PatternCode in '6' column"
Thank you very muchhhhhh
=if(L2=A, '1','0')
Hi Syed,
=IF(L14="A","1","0")
=IF(L2="A","1","0")
if weight is 0.001 to 2.000 Kg = 10 Rs & above 2.000 per kg 2 Rs.
Hi Sunil,
u can use this formula
=IF(AND(I22>=0.0001,I22<1999.99),"10","2")
can you use "OR" in If formulas?
i.e if a cell has values LV1 or LV2 (Either or)
True: "OK"
False: "Invalid"
Hi Johnny,
Sure, you can. The formula can look similar to this:
=IF(OR(A1="LV1", A1="LV2"), "OK", "Invalid")
Hi,
I am using the German version of Excel, I want to add ">0" (bigger than zero)
wit this formula,
Can someone help me please how to do it
Thank you
=SUMMEWENN(C11:C47,"Handy",G11:G41)
I have allready tried so it is not working
=sumif(C11:C47,"Handy",G11:G41,">0")
Hi Nabi,
Firstly, because you have 2 conditions, you need to use the SUMIFS function that allows for multiple criteria. And secondly, the ranges should be of the same size. You also need to specify the sum_range.
If you want to count the cells based on 2 conditions, then use the COUNTIFS function like:
=COUNTIFS(C11:C47,"Handy",G11:G47,">0")
Thank you very much for your help it was useful but it counting the numbers of the name repeating not the amounts in the cells.
Hi Svetlana. Can you please help me with an If statement I am trying to create for a data set? The condition is that if the following names are within a specific column, then label it "pricing" in the exisiting cell or else if none of these names exist within that column then call it "contracting". So For example, IF (B7="Bob","Claire", "Roger")= "Pricing" OR "Contracting". Something along those lines..
Hi Safah,
witch name coming under "Pricing" u make one column(example,"Bob","Claire", "Roger" this name in C column),and compare to B2 and "Pricing" column u are result will come..
formula =if(B7=C:C,"Pricing","Contracting")
Hi Svetlana. Can you please help me with a formula? I want a cell to return the word "Write-Off" if the cell is bettween -$1 and $1. However the formula that I have doesnt work. =IF(AND(B2>1, B2<-1), "WRITE OFF", ""). Thank you.
hi Sue,
use this formula your result will come...
=if(B2<2,"WRITE OFF","")
Hi Sue,
Your used the right approach, just swap the numbers in the AND statement:
=IF(AND(B2>-1, B2<1), "WRITE OFF", "")
If you want between -$1 and $1 inclusive, then use the following operators:
=IF(AND(B2>=-1, B2<=1), "WRITE OFF", "")
please can any body advice:
when need c1= a1 or b1 (if b1=0 then c1=a1)
Hi Mukul,
Here's the formula for C1:
=IF(B1=0, A1, B1)
I have various cells with different dates, going along I want to highlight cells that have a difference in date greater than 6 weeks between them
IE.
A B C
1 Review 1 Review 2 Review 3
2 01.01.2015 01.02.2015 01.12.2015
So review 3 date I want to be highlighted as there more than 6 weeks between them.
I found one which is =today()-C3>42 but that’s not right is it coz that’s working from today… right? BUT if I change it to =-B2-C2>42 I thought that might work but it only works on one cell (I’m obvs changing to B3 etc.) I’m soooo stuck!
can u pls sand me work sheet "hemanth923@gmail.com"
hi Daisy,
first u convert to days like below formula =DAYS360(A2,TODAY())
386 356 56 32
01-01-2015 01-02-2015 01-12-2015 25-12-2015
and down cell u use this formula =HLOOKUP(IF(42<A1,A1),A1:A2,2,FALSE)
42 days above it will so date, 45 days below it will so #N/A
i thing this is method for u are result
ah thank you, I will send it to you now!
Hemanth, did you get my email?
IF B1 (46,371) is less than C1 (240,000)
= result will be B1 (46,371)
Or if B1 (250,000) is greater than C1 (240,000)
= result will be C1 (240,000)
pls help me to assign formula.
thanks & best regards
faahem
=IF(B1<C1,B1,C1)
Hi, faahem
Formula is =max(B1:C1) this will give the result which ever is of greater value.
can any1 tell me a formula for this:
Months: Jan Feb March Apr May
Prodt1: 25 30 35 20 10
Prodt2: 16 45 80 65 25
Prodt3: 15 65 32 45 75
i want to create a formula to catch the month having maximam rate in the next two columns.
Thanks in advance.
hi Abid
your repor like below...
Months: Jan Feb March Apr May
Prodt1: 25 30 35 20 10
Prodt2: 16 45 80 65 25
Prodt3: 15 65 32 45 75
how many "Prodt1" row is there that much you copy and paste in down row month also and use this formula =HLOOKUP(MAX(B3:F3),B3:F6,4,FALSE)
below like...
Months: Jan Feb March Apr May your result
Prodt1: 25 30 35 20 10 March
Prodt2: 16 45 80 65 25 March
Prodt3: 15 65 32 45 75 May
Jan Feb March Apr May
Jan Feb March Apr May
Jan Feb March Apr May
Months: Jan Feb March Apr May "your result "
Prodt1: 25 30 35 20 10 March
Prodt2: 16 45 80 65 25 March
Prodt3: 15 65 32 45 75 May
Months: Jan Feb March Apr May
Months: Jan Feb March Apr May
Months: Jan Feb March Apr May
Hi, faahem
Formula is =max(B1:C1) this will give the result which ever is of greater value.
Hi Abid,
Sorry, I'm not sure I can follow you. To make things clearer, what exactly values do you want to have in the next 2 columns for Prodt1?
Good morning,
Could someone help me with a formula? I need to make the following logic.
If A1&B1="Text" then Display "Text". If A1&B1 = Time entered then calculate Total Number of Hours worked i.e B1-A1
Thank you very much in advance
AQureshi
If A1 and B1 are text values, do you want to display one of those texts, or both, or some other text?
Hi Svetlana,
I'm trying to find a formula like: =(if H2 - L2 > 5 "conflict" or H2-L2 < -5 "conflict"). Thank you very much in advance.
Hi Emre,
You can use a formula similar to this:
=IF(OR(H2-L2>5, H2-L2<-5),"conflict", "")
Need Help!
If A1 says "Daniel" then B1 needs to be 30, but if it says "Jessica" it it needs to be 20, and if its any other name then the cell needs to be blank
Hi Joe,
Here you go:
=IF(A1="Daniel", 30, IF(A1="Jessica", 20, ""))
I want 10.3 is written 10 and 10.9 is also written 10.
Garments 210 159
in"1"Ctn 15 15
Ctns 14 10.6
I will packed 10 cartons with garments but not .6 carton. Plese tell me the formula which automatically write 10.6 to 10.
Hello Ahsan,
You can use the TRUNC function to truncate a decimal number to an integer, e.g: =TRUNC(A1)
Hi,
What if I require A2 to show the value of A1 if less than 999 to be 0 (in A2 cell), greater than 1000 to be 15 (in A2 cell), greater than 2000 to be 50 (in A2 cell), greater than 5000 to be 100 (in A2 cell), greater than 10000 to be 200 (in A2 cell), greater than 20000 to be 400 (in A2 cell)?
Is this possible?
Hello Lee,
You can do this by using the following nested If's:
=IF(A1>20000,400,IF(A1>10000,200,IF(A1>5000,100,IF(A1>2000,50,IF(A1>1000,15,0)))))
Hi Svetlana. Thanks for the guide, it has been very helpful.
However, I'm in a bit of a tricky situation.
Let's consider a data set of two columns (A and B) each with a 100 observations. I want to compare the same value from A with B (e.g. A2 vs B2) so that values of B that are more than 1.5 units greater than A is defined as TRUE. Here is an example: A2 = 0.5, B2 = 3.5. Since B is more than 1.5 units greater than A this would be defined as TRUE. The point is to show which observations that are changing significantly (which is defined as 1.5 units and more of A's values)
I would think the mathematical expression for this would be something like: TURE if B = A + >1.5. Can't come up with a syntax for this expression that actually works. Please help!
Hi Andreas,
If my understanding of your task is correct, the following formula should work a treat:
=IF(B1-A1>1.5, TRUE, "")
Hi My question is if there would be alpha numeric value in particular cell then how can i use the if function see the example below :-
60 DAYS DUE NET - NO
45 DAYS DUE NET - Yes
in above i want to use the if function if the days is less than 60 days it would be "Yes" else "No"
Hi Gaurav,
You can use use the LEFT function to extract the first 2 characters and NUMBERVALUE to convert them to a number:
=IF(NUMBERVALUE(LEFT(A1,2))<60, "YES", "NO")
sorry but formula given by you is not working
On my test sheet, the formula works correctly for 1-digit and 2-digit numbers. For 3 and more digits it does not work. Is it the case? If so, please let me know the maximum number of digits you have before the "DAYS DUE NET" text.
Thanks Svetlana ....formula after make changes as =IF(LEFT(A5,2)< "60","Yes","No")
Good morning,
Could someone help me with a formula? I need to make the following logic.
If C60>L51, Use L51 value. If C60 <= L51, do C55xC59
Thank you very much in advance
Gustavo
Hi Gustavo,
Here you go:
=IF(C60>L51, L51, C55*C59)
Need help please.
Two Columns of unique data, column A & B. New column (C) of data which is a sample of column A. I want a new column (D). Column D looks at data in column c & a. If they match, put value from column B (that's beside column A).
C is less than A, so there will be no false answer.
Thanks
Hi Albert,
Hopefully this is what you are looking for:
=IF(C1=A1, B1, "")
The formula returns a value from B1 if C1=A1, an empty string (blank cell) otherwise.
hello
can anyone help me with the follow?
if A3=C1 then F1/2
thank you
Hello Petros,
Here you go:
=IF(A3=C1, F1/2, "")
Hi - need help to have If statement - i.e if cell a1 has a value of #Value!, I want to add the cell content from Y1
Hi Colin,
Is my understanding correct that you want to add the content from Y1 to A1 when A1 has the #Value! error? If so, you can encslose the formula you currently have in A1 in the IFERROR function, like this:
=IFERROR(your formula, Y1)
hi,
I want to do an if function with something like this
if(40<x<140,5%*5,).
I tried it but it does not pick those numbers between 40 and 140 for the calculations. the output i get for those numbers are 0.
please assist. thanks in advance.
Hi Abraham,
To pick numbers between 40 and 140, you need to embed an AND statement into your formula, for example:
=IF(AND(A1>40, A1<140),5%*5,)
TABLE 1
COUNTRIE CAPITAL RESULT
INDIA LUCKNOW
USA ITALY
THAILAND BANGKOK
THAILAND SPAIN
INDIA NEW DELHI
USA AMERICA
TABLE 2
COUNTRY CAPITAL
INDIA NEW DELHI
THAILAND BANGKOK
USA AMERICA
AS GIVEN IN TABLE 2, ARE THE CORRECT CAPITALS OF PROVIDED COUNTRIES AND ACCORDING TO THAT DATA, MATCH THOSE CAPITALS FROM TABLE 1. IF THE CAPITAL IS CORRECT, THEN RESULT SHOULD BE TRUE, OTHERWISE FALSE
PLEASE HELP ME
Hi Neeraj,
I have used the data table structure you have mentioned in your post and got the required outcome you are looking for.
Given below is the formula with the column reference:
Table 1 with incorrect capitals - column A=Country, Column B=Capital and Column C="True/False".
Table 1 with correct capitals - Column E=Country, Column F=Capital.
Formula: =if(iferror(vlookup(A2, E:F,2,false)=A2,"TRUE"<FALSE".
In the column you can get the True or False depending on whether the right capital has been typed in.
Let me know is you get this or I can send you a sample template with your data.
Regards,
Ramki
Oops, The table with the correct capitals should be Table 2 and not table 1.
Regards,
Ramki
if the cell has a vlue it has to take that value or else it has to take next cell value by multiplying *3.75
Ex-if A1 has a vlue it has to take A1 or else it has to B1*3.75
Anybody can help to solve this function
Hello Hashid,
Here you go:
=IF(A1<>"", A1, B1*3.75)
Thank you Svetlana ..Thanks alot it is very help to my day today work..once again thank you...
I have one table that has a Zip code and other info about a person and also needs a County column filled in this same table. I have another table that has Zip Code with a County connected to it. How would I approach this?
table 1 that needs the county info attached has the following columns.. Zip is H. Where I need the data is N. The other table where im pulling the county info from is.. Zip is column T and county column V