find the almost identical cells in a range - excel

i am looking for a formula or something like that to find the most nearest or almost identical values in a range of google spreadsheet.
for example look at the following values of different cells.
3,5,13,18,19,20,21,26,28,52,62,75
I want a result like this group of value (18,19,20,21)
because in that range, only these values has the least difference to each of them.
if it is possible then please help..
Thanks in advance!

Place the values in column A and sort them. Then in B1 enter:
=IF(A2-A1<=1,"Good","")
and in B2 enter:
=IF(OR(A3-A2<=1,A2-A1<=1),"Good","")
and copy down.

Related

Extracting other column value based on lookup

I have one large row of data, containing multiple observations. The data consits of:
PO number
Amount
Location
See attached image:
Now what I want is that PO Number 8382 (A2) is looked up in A8:L8 and puts in B2 the amount of each PO number and puts in C2 the location. So what it needs to do, is lookup a value in the row and extract the value on the right of it. I tried H.lookup but that did not work.
Can anyone help me? I used index and match, but I can't make it work. I believe it's probably a simple question but I can't figure it out.
Thank you in advance!
Your thinking is correct.
In cell B2:
=INDEX($A$8:$L$8,1,MATCH($A2,$A$8:$L$8,0)+1)
In cell C2:
=INDEX($A$8:$L$8,1,MATCH($A2,$A$8:$L$8,0)+2)
Copy down.
Try this (It find first occurence in ROW 8)
Cell B2 formula =OFFSET($A$1;1;MATCH($A2;8:8;0);1;1)
Cell C2 formula =OFFSET($A$1;1;MATCH($A2;8:8;0)+1;1;1)
You could use:
=IFERROR(INDIRECT(ADDRESS(8,MATCH(A6,$A$8:$H$8,0)+1)),"PO not found")
using IFERROR you avoid receiving errors if any of the PO not found.

Return Match Values and also count this value for how many repeated in a range of cell in Excel

I am straggling with some formula that I have a spreadsheet that contains two range of cells. What I want to do is,
I would like to create a search Box that will search a value from Range A and if found return range B value and also will count of range B value is repeated.
Below image is for what I mean
I used INDEX, MATCH and also IF Functions :( but not really get what I wanted.
I am poor in formula, so it would be great if someone can figure out what kind of functions I should use for this.
For information, it can be achieved through formula as below.
E3 houses the value being searched for e.g. "A"
In cell F3 insert following array formula which needs to be committed by hitting CTRL+SHIFT+ENTER simultaneously.
=IFERROR(INDEX($B$1:$B$1000,SMALL(IF(IFERROR(MATCH($E$3&$B$1:$B$1000,$A$1:$A$1000&$B$1:$B$1000,0),0)=ROW($B$1:$B$1000),ROW($B$1:$B$1000)),ROWS($A$1:A1))),"")
Copy down as much as you need.
You need to adjust 1000 to suit your data. It should match last row.
In cell G3 you can use following formula.
=IF(F3="","",COUNTIFS(A:A,$E$3,B:B,F3))
Copy down as much as you need.

Excel formula to split and assighn value to each cell in Excel

I have a column in excel with the below values
Now I want to split that column into 4 columns with the values as below.
Am trying with Excel formulas using nested if with AND, OR and substitute, but not able to achieve it. Any suggestions/help on how can I get this ?
Thanks in Advance
One solution to Your problem, if not this might move you to the correct answer, could be
=IF(ISNUMBER(SEARCH(C$1,$A2)),IFERROR(MID($A2,FIND(C$1&" $ ",$A2)+6,LEN(C$1)),MID($A2,FIND(C$1&" $",$A2)+5,LEN(C$1))),0)
Im assuming that your Column 1 starts in A1 and your first input is in A2 further more im assuming headers ABC, DEF... are put in from C1. So putting this formula in C2 you can drag this across and down.
The IFERROR handles the possibility that there is a space behind the $

Excel: How to write z=f(x,y) for different values of (x,y)

Anyone can help me with this problem?
I would like a way to write a formula z=f(x,y) and tell excel to calculate the value of that formula for different sets of the couple (x,y).
Or I could do this but I don't know how:
CELL 1:x^2+y^2,x=A1,y=A2
CELL 2:x^2+y^2,x=B1,y=B2
CELL 3:x^2+y^2,x=C1,y=C2
etc...
How can I do?
Thanks in advance for your precious help
I'm not sure I'm entirely clear on what you need, so here's my response to what I think you're asking. Why not put all x's in one column, y's in the next column, and then have the function(s) in the subsequent columns? Then you can input the formula in the function column and drag it down. If you need to have the results appear together in the resultant (x,y) format, consider concatenating the next column. Something like this:
You can write:
In A1 first value of X
In A2 First value of Y
In A3 =the formula(X,Y) In a way Excel can calculate it like in your question:
=A1^2+A2^2
In B3 -->F3 for example write X values
In A4 -->A10 for example write Y values
Select A3:F10 Clickon Data Table in Data Tab
In Row Input Cell write A1
In Column Input Cell write A2
Click Ok
You will have all the values in an Array
Thank you all for your quick support and help. It is a nice community.
I solved the problem using data table, as suggested.
You can find a link to the picture showing what I wanted to get.
Data Table

Dynamical SUMIF command

If it is possible, I'd like to create a formula that will allow me the following:
Formula must be in the entire column or in this example, in the range B1:B5. The formula is based on a condition, that when the total sum of cells from column A is lower D1, than it gives "X". If the total sum is over D1, then it gives an empty field - "".
In this example the total sum of the cells, that are over D1 value is in the first 3 rows, hence the three X-es, and then it stops.
(source: shrani.si)
.
I presume it would be possible to do this with multiple SUMIF commands, but does anyone know a smoother solution for this?
Thanks!
You can do this easily by using an absolute reference for the starting point of a SUM and using a relative reference for the end point. When copied down, this formulas works fine.
=IF(SUM($A$1:A1)<$D$1,"x","")
Results
Try this
=IF(SUM(OFFSET(A1,0,0,$A$1:A1,1))>$D$1,"X","")
This formula should start at B1 and then you use auto-increment to populate other cells

Resources