H
H
hofix2020-08-21 07:04:21
libreoffice
hofix, 2020-08-21 07:04:21

How to correlate 2 columns with different intervals in values?

Input data:

Table No. 1
1 Petya
2 Vasya
3 Kolya
4 Sasha

Table No. 2
2 Pupkin
4 Koshkin

The result should be:
Table No. 3 FINAL
1 Petya
2 Vasya Pupkin
3 Kolya
4 Sasha Koshkin

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Artyom Sakharov, 2020-08-21
@Re1ter

I do not use Libra, but I think it should be similar to Excel. We insert the formula into the third column and stretch:
=$A1&" "&$B1
UPD: perhaps I misunderstood you, and the data is not located opposite each other, but in columns without spaces (as in the figure below), then the solution will be a different
5f3f9bd0b5568349378394.png
formula in Russian:
=IF(END(SEARCH(LEFT($A1)&"*";B:B;0)),$A1;$A1&" "&RIGHT(INDEX
(B:B;SEARCH(LEFT($A1) &"*";B:B;0));DLSTR(INDEX(B:B;MATCH(LEFT($A1)&"*";B:B;0)))-2))
English formula:
= IF(ISNA(MATCH(LEFT($A1)&"*",B:B,0)),$A1,$A1&" "&RIGHT(INDEX
(B:B,MATCH(LEFT($A1)&"*" ,B:B,0)),LEN(INDEX(B:B,MATCH(LEFT($A1)&

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question