Forum

Check Column B for ...
 
Notifications
Clear all

Check Column B for Changes in Column A

4 Posts
2 Users
0 Reactions
55 Views
(@milesy)
Posts: 2
New Member
Topic starter
 

HI Guys

 

i have a spreadsheet that looks like this

A                       B

C001                 Value 1

C001                 Value 1

C001                 Value 1b

C002                 Value 3

C002                 Value 3

C003                Value 3b

C004                Value 4

 

What i am trying to achieve is a script that will look at the first Column A value - and will compare it to each Column B value UNTIL there is a change in Column A and then start again ......so the net result would be

 

A                       B               C

C001                 Value 1       ok

C001                 Value 1        ok

C001                 Value 1b      different

C002                 Value 3         ok

C002                 Value 3         ok

C003                Value 3b        different

C004                Value 4           ok

 

Any thoughts on how to achieve this???

 
Posted : 08/03/2019 6:09 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Adrian

Maybe you can try a formula.

See if this helps.

Sunny

 
Posted : 08/03/2019 8:35 pm
(@milesy)
Posts: 2
New Member
Topic starter
 

HI Sunny

 

the problem is the full sheet can have many many entries in column A

 

like the attached

 
Posted : 08/03/2019 10:58 pm
(@sunnykow)
Posts: 1417
Noble Member
 

Hi Adrian

It doesn't matter how many rows you have.

In cell C2 enter ok.

In cell C3 enter =IF(C2="different","ok",IF(A3&B3=A2&B2,"ok","different")) and then double click on the bottom right corner of C3 (where a tiny black square appears) to copy (fill) the formula downwards.

I did note that your data is not "clean". For eg. cell B37. It looks similar to B36 but there is an extra space after the letters pF. This can cause erroneous result. You may need to remove such spaces for the formula to work correctly.

Sunny

 
Posted : 09/03/2019 2:45 am
Share: