Data representation

Usercode

Board Regular
Joined
Aug 18, 2017
Messages
107
Office Version
  1. 2016
Platform
  1. Windows
I have a complex problem. I hope I can find a solution here.

I have a range of sample data in columns A:G. I want to create a representation of this data in columns I:O like this:


Each cell of every row is compared with the next 5 rows. If the value of the cell or +1/-1 value of the cell is present in any of the rows, then it is represented with one of the letters (a,b,c,d,e). If there is a repetition, then the closest row/cell is counted only.


Starting from each cell of every row, if the value of the cell or +1/-1 value is present in the next row, then it is represented with "a", and the process stops for this cell, and goes to the next cell in the same row.


If not present, then it checks the next row, and if the same or +1/-1 is present in the next row, it is repsented with "b".

it goes on like this for the next 5 rows, and represent with (a,b,c,d,e) in order.


For example, A1: (1.0), and it is not present in second column so it's skipped, and in the next column, it is present (A3). so It will be represented with "b" in J1: (a).


B1: (3.0) is not present in the next 5 rows, but +1/-1 value of 3.0 is present, in the next column, so it is represent with "a" in K1: (a)


and if the value or +1/-1 value of the cell is not present in the next 5 rows, then it is represented with "x".

Sample data:https://1drv.ms/x/s!AoGkZUHlKui9gRean_XzUEkUo7_c


jgie1vS.jpg
 
Thanks a lot, Peter. I checked it, it is exactly what I needed. I am sorry, I didn't really understand how your original formula works, so I couldn't adjust it myself, and I had to ask again.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Thanks a lot, Peter. I checked it, it is exactly what I needed. I am sorry, I didn't really understand how your original formula works, so I couldn't adjust it myself, and I had to ask again.
No problem. That is what the forum is for. :)
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,189
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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