tag:blogger.com,1999:blog-1869924468172210809.post5001132280450552252..comments2019-01-19T18:09:01.194+00:00Comments on Not Just Numbers: EXCEL TIP: The IF Statement made simpleGlen Feechanhttp://www.blogger.com/profile/12461985809302036952noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-1869924468172210809.post-61026985992504463612018-02-26T17:51:18.818+00:002018-02-26T17:51:18.818+00:00Try this. You will need a helper row though.
We...Try this. You will need a helper row though.<br />We'll assume your data covers 52 columns, i.e. column B to column BA.<br />In cell B3 insert the formula:<br />=A3+B2<br />and copy along to column BA (make sure there is nothing in cell A3)<br />We can then use INDEX and MATCH to solve you problem:<br />=INDEX($B$1:$BA$1,MATCH($A$2,$B$3:$BA$3,1)+1)<br /><br />The MATCH function identifies the last column in our cumulative range that is still below cell A2. We add one to this to be the column which exceeds it. The INDEX then returns the corresponding value from row 1.<br />Glen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-89496048326419940922018-02-25T23:28:49.783+00:002018-02-25T23:28:49.783+00:00I have one for you. I am looking for a formula tha...I have one for you. I am looking for a formula that can stop when it reaches a negative number in the row and return the value in row 1 of the column it turned negative in. Ie, if I have X carrots and I want to figure out when I will run out of carrots, knowing the weekly demand for the carrots... (terrible example but hopefully you understand). I'm using if(sum(b2:c2)>a2,c1) then I'm filtering out the date returned from the equation and changing to if(sum(b2:d2)>a2,d1) and so on with the filtering. This gets tiring after a while especially when you are looking out weekly over the course of 12 months:( In this example row 1 is a date and the columns start with the carrots I have and continue with the demand for said carrots... Any help appreciated!Unknownhttps://www.blogger.com/profile/14176295104052911950noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-44881012040139758622017-10-16T06:29:31.982+01:002017-10-16T06:29:31.982+01:00See aboveSee aboveGlen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-33805959740108954082017-10-16T06:29:22.894+01:002017-10-16T06:29:22.894+01:00Try:
=IF(E2-B2>=0,"Increased by ",&qu...Try:<br />=IF(E2-B2>=0,"Increased by ","Decreased by ")&TEXT(ABS(E2-B2),"$#,##0.00")<br /><br />The & character allows you to add text strings together.<br />The TEXT function converts a number to a string in a specified number format.<br />The ABS function returns the absolute value of a number, ignoring the +/-.<br /><br />Take a look at my post on using data in sentences for more details:<br />http://www.notjustnumbers.co.uk/2012/11/excel-tip-using-data-in-sentences.htmlGlen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-43870859230992259642017-10-16T02:06:43.356+01:002017-10-16T02:06:43.356+01:00How do I create a statement that will display the ...How do I create a statement that will display the sentence "increased by $_._" if there was an increase in a price (ex: E2-F2, E3-F3), or "Decreased by $_._" if there was a decrease in the price ????? Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-80599188179649199432017-10-16T02:04:07.352+01:002017-10-16T02:04:07.352+01:00How do I do an IF statement with words and numbers...How do I do an IF statement with words and numbers? My question is asking me to create a statement where I need to look at the difference between two columns (ex: E2-B2,E3-B3) and make a statement that will display the sentence "Increase by $_._" if there was an increase (positive) or "Decreased by $_._" of there was a decrease (negative) ??????Shannon Pagehttps://www.blogger.com/profile/08120846656251988676noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-28178337156442592942017-09-11T18:58:22.363+01:002017-09-11T18:58:22.363+01:00If I understand correctly, your issue is not with ...If I understand correctly, your issue is not with the formula but with number format of the cell. Right-click on the cell containing the formula and select format cell, then on the Number Format tab choose Number and select the number of decimal places you want. This determines how the number is displayed. 1 and 1.0 are the same number, just different eays of displaying it, so you adding .0 to the formula didn't change anything.Glen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-91588227096696951602017-09-11T10:40:05.768+01:002017-09-11T10:40:05.768+01:00Hi,
I was hoping to get some help with my formula...Hi,<br /><br />I was hoping to get some help with my formula below:<br /><br />My cell E32 is interchangeable, could be 50, 45, 32, 0, e.t.c. I want the returned value to be in two (2) decimal place if condition is met in the formula. instead of just displaying 1, 2, 3, 4,5 in my formula it should give me exact value in 1 or 2 decimal places. i tried to add .0 to the formula but each time it keeps disappearing.<br /><br />=IF(AND(E32>0,E32<2.2),1,IF(AND(E32>2.2,E32<4.4),2,IF(AND(E32>4.4,E32<6.6),3,IF(AND(E32>6.6,E32<8.8),4,IF(AND(E32>8.8,E32<=11),5,"Out of Range")))))<br /><br />ThanksUnknownhttps://www.blogger.com/profile/08797182300743610405noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-40449139743594295772016-11-07T07:14:48.536+00:002016-11-07T07:14:48.536+00:00I would recommend calculating the amount above reg...I would recommend calculating the amount above regional target in a separate cell (say N2), then if you want to use the IF statement it would be something like:<br /><br />IF(N2>=5000,M9,IF(N2>=1000,M8,IF(N2>=500,M7,0)))<br /><br />However, the following poat fives a neater approach to thua kind of problem:<br /><br />http://www.notjustnumbers.co.uk/2012/10/excel-tip-look-up-commission-or-tax.htmlGlen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-13358065809245479902016-11-07T02:10:09.969+00:002016-11-07T02:10:09.969+00:00What if it's "-1,900", how can I put...What if it's "-1,900", how can I put that in a IF function?<br /><br />THIS IS THE EXACT QUESTION I NEED ANSWERED:<br /><br />If the units sold is 5,000 or more above the regional target, the employee gets the value in M9. If the units sold is 1,000 or more above the regional target, the employee gets the value in M8. If the units sold is 500 or more above the target, the employee gets the value in M7, otherwise they get $0.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-18892019500905925852016-08-19T06:41:59.092+01:002016-08-19T06:41:59.092+01:00Check your brackets. Your IFNA doesn't close u...Check your brackets. Your IFNA doesn't close until your final bracket (hence this is just one IFNA function). The rest of your function is just the condition for your IFNA function and it will return B2 if that whole function returns NA.Glen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-50808735460292093192016-08-19T05:10:42.236+01:002016-08-19T05:10:42.236+01:00Any advice for me. Seems like formula is only cat...Any advice for me. Seems like formula is only catching IFNA<br />=IFNA(IF(AND(B2<0,C2<0),B2-C2)&IF(AND(B2<0,C2>0),B2+C2)&IF(AND(B2>0,C2<0),B2+C2)&IF(AND(B2>0,C2>0),B2-C2),B2)Sceptre Tourshttps://www.blogger.com/profile/07903679130036611450noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-10388180605566591962016-08-10T12:20:31.110+01:002016-08-10T12:20:31.110+01:00You need to leave d2 alone and use it in the formu...You need to leave d2 alone and use it in the formula in another column, say column E. So in E2, you would use the formula:<br /><br />=IF(a2="sales return",-d2,d2)<br /><br />Then use column E as your values.Glen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-5899031411141669902016-08-10T12:15:24.984+01:002016-08-10T12:15:24.984+01:00Here's one for you!
My order book shows sales...Here's one for you!<br /><br />My order book shows sales orders AND sales returns as positive numbers. <br /><br />How would I construct an IF statement that says "if(a2="sales return",make the number in d2 a negative, leave as is)?<br /><br />Or is there another way...?<br /><br />Thanks in advance :)Jaine Willshttps://www.blogger.com/profile/07639362792114658617noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-79183067705413762832016-03-01T00:32:37.030+00:002016-03-01T00:32:37.030+00:00Thanks for the feedback Glen.
Sorry I haven't...Thanks for the feedback Glen.<br /><br />Sorry I haven't had the chance to read all of your posts earlier but I am surely will do. :)Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-76585598773145085322016-02-29T13:08:17.616+00:002016-02-29T13:08:17.616+00:00@tikun
You can use Nested IF statements - see this...@tikun<br />You can use Nested IF statements - see this earlier post:<br /><br />http://www.notjustnumbers.co.uk/2015/06/excel-tip-nested-if-statements.html<br /><br />However, a better solution would be to use a lookup table, as per this post:<br /><br />http://www.notjustnumbers.co.uk/2012/10/excel-tip-look-up-commission-or-tax.htmlGlen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-49687699023955773922016-02-29T06:53:47.627+00:002016-02-29T06:53:47.627+00:00Hi Glen,
How do I use IF statement if I have seve...Hi Glen,<br /><br />How do I use IF statement if I have several conditions like below:<br /><br />Example:<br /><br />Cell A2 - number with 2 decimal places (e.g 2.46)<br /><br />I want to categorize the value in column A (A2 to ~) into next cell/column by the below conditions:<br /><br />Bin1 = 1.75 ~ 2.01<br />Bin2 = 2.01 ~ 2.18<br />Bin3 = 2.18 ~ 2.37<br />Bin4 = 2.37 ~ 2.57<br />Bin5 = 2.57 ~ 2.71<br /><br />How do I create an IF statement that contains all 5 conditions? I believe there is a way.<br /><br />Regards,<br />@tikun<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-53958867662752865302015-05-19T22:15:54.530+01:002015-05-19T22:15:54.530+01:00or use a Boolean solution:
=5*(B11="nylon&qu...or use a Boolean solution:<br /><br />=5*(B11="nylon")<br /><br />jabcheAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-31490848671992731622015-05-19T22:11:34.993+01:002015-05-19T22:11:34.993+01:00Peter,
if that were true then the first comma wou...Peter,<br /><br />if that were true then the first comma would have been a semi-colon too<br /><br />or perhaps that one was the misytpe<br /><br />jabcheAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-40706566193910581982015-05-19T22:00:09.588+01:002015-05-19T22:00:09.588+01:00instead of nesting IFs, I'd enter:
=IF(ISNU...instead of nesting IFs, I'd enter:<br /><br /> =IF(ISNUMBER(A2),CHOOSE(SIGN(A2)+2,"negative","nil","positive"),"n/a")<br /><br />which will return n/a if A2 is anything but a number (there's never a single "right" answer)<br /><br />JimAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-70853474061235492362015-05-19T21:25:47.957+01:002015-05-19T21:25:47.957+01:00make sure calculation isn't set to manual (thi...make sure calculation isn't set to manual (this has caught me out several times)<br />press F9 to force a recalculation<br /><br />JimAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-72891014651971792962015-02-26T07:24:13.573+00:002015-02-26T07:24:13.573+00:00Just use the same logic again, leaving your formul...Just use the same logic again, leaving your formula as a third argument in another IF:<br /><br />=IF (A2="","N/A",IF(A2=0,"NIL",IF(A2>0,"POSITIVE","NEGATIVE")))Glen Feechanhttps://www.blogger.com/profile/15601120984639539346noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-2156150845749382592015-02-26T02:54:14.377+00:002015-02-26T02:54:14.377+00:00=IF(A2=0,"NIL",IF(A2>0,"POSITIVE...=IF(A2=0,"NIL",IF(A2>0,"POSITIVE","NEGATIVE"))<br /><br />If A2 is 0, this will return the word NIL, however if A is not 0 the third argument is another IF statement that will return the word POSITIVE if A2 is greater than zero, otherwise it will return NEGATIVE.<br /><br />as per the above example, <br />my Query is if the cell is 0 the value be Nil, but if my cell is empty, it is also considering as 0 and place the value as Nil, <br />i Required, if the cell is empty the result to be filled as N/A, <br />Kindly suggest..arun prasathhttps://www.blogger.com/profile/07655475221734514687noreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-64443167462354789352015-01-15T22:17:27.507+00:002015-01-15T22:17:27.507+00:00The first assumption would be that if your formula...The first assumption would be that if your formula tells you the two cells are not the same then it is right. A number may have a small rounding error that prevents a match even when the numbers display the same. Text may have a trailing space or non-printing character. Another possibility is that one of the 'numbers' may actually be a number whilst the other is digits formatted as text.<br /><br />By the way, $G$21 strikes me as somewhat small for a validation 'list'.<br />PeterAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1869924468172210809.post-11414617375767154302015-01-15T21:49:22.309+00:002015-01-15T21:49:22.309+00:00jabche
I think the posted formula is a non-Englis...jabche<br /><br />I think the posted formula is a non-English localisation so the comma (,)becomes a decimal point (.) and the semi-colon separator (;) becomes the comma (,) as you suggested.<br /><br />One thing that is possible as an alternative to CSE data entry is to place the formula in the 'Refers to' box of a new Name (e.g. filtered_average) using Name Manager.<br /><br />Then typing <br />= filtered_average <br />anywhere in the workbook outputs the result.<br /><br />PeterAnonymousnoreply@blogger.com