[Solved] Search Value in a double column

Discuss the spreadsheet application
Post Reply
Marck_97
Posts: 8
Joined: Sat Jun 08, 2019 6:40 pm

[Solved] Search Value in a double column

Post by Marck_97 »

Hello to everyone,
I wanted to ask help about how to do this thing :
Image
I want to search a value in a C column but to do so the calc need to search first the value in the A column and then another specified value in the B column.
I will do an example, I want to know the value in the C column that is in the same line of the "A" value and "G" value ( So I want to get the 4).
How I can do it?
P.s. this table is an example of a generated table, sadly the lines arent static so they change every 15 seconds and thereafter I cant manualy link a cell to get the value but I need a formula to query it.
Still tnx for the help and sorry for my bad english.
Waiting for an answer, Cheers and best.
Marck
Last edited by Marck_97 on Thu Jun 13, 2019 9:14 am, edited 1 time in total.
Open office 4.1.6
User avatar
MrProgrammer
Moderator
Posts: 4905
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Search Value in a double column

Post by MrProgrammer »

Hi, and welcome to the forum.
Marck_97 wrote:I want to search a value in a C column but to do so the calc need to search first the value in the A column and then another specified value in the B column.
[Tutorial] VLOOKUP questions and answers Q22/A22

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Search Value in a double column

Post by RusselB »

Trying to account for the lack of English language skills, I think what you are saying is that you want to return the entry from column C given that there is a match to a search in columns A and B.
eg: Search column A for B and column B for M would return the value of 16.
I have to concur with MrProgrammer that the simplest way of doing this is described in the tutorial he linked to.
There are other, more complicated methods.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Marck_97
Posts: 8
Joined: Sat Jun 08, 2019 6:40 pm

Re: Search Value in a double column

Post by Marck_97 »

MrProgrammer wrote:Hi, and welcome to the forum.
Marck_97 wrote:I want to search a value in a C column but to do so the calc need to search first the value in the A column and then another specified value in the B column.
[Tutorial] VLOOKUP questions and answers Q22/A22

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.
Good evening and Tnx for the reply sir,
I am happy to be one member of this community.
I read the forum u linked and the other links that talked a way to resolve this problem.
Well, The closes thing that could resolve the problem was to copy the value in A and B column in the D column and then search a complete value in this column with this formula :
=VLOOKUP("AD";"A1:D30";3;0).
With this formula it should show me the value in the C column that is in the same line of "AD", so 1.
THe problem is that if I use 0, the formula states me Not found, if I use 1 the formula gave me always 8 .
What is wrong there?
A D 1 A,D
A E 2 A,E
A F 3 A,F
A G 4 A,G
A H 5 A,H
A I 6 A,I
A L 7 A,L
A M 8 A,M
B D 9 B,D
B E 10 B,E
B F 11 B,F
B G 12 B,G
B H 13 B,H
B I 14 B,I
B L 15 B,L
B M 16 B,M
C D 17 C,D
C E 18 C,E
C F 19 C,F
C G 20 C,G
C H 21 C,H
C I 22 C,I
C L 23 C,L
C M 24 C,M
Attachments
Cattura.PNG
Open office 4.1.6
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: Search Value in a double column

Post by RusselB »

I'm going to suggest that you insert a column between columns B and C (presuming that column B has your letters D and up, and C has your numbers)
That will now make your column with the numbers D. In the new column C enter

Code: Select all

=A1&B1
then copy that down for all the rows of your data.

Additionally, the VLOOKUP formula you posted is not correct...in a lot of ways. A VLOOKUP formula that would work (with the modifications I have suggested) would be like

Code: Select all

=VLOOKUP("AD";C1:D30;2;0)
Note: I use the same search parameter that you specified in your last post.

With these modifications, your current column D (which would become E) will be irrelevant
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
Marck_97
Posts: 8
Joined: Sat Jun 08, 2019 6:40 pm

Re: Search Value in a double column

Post by Marck_97 »

RusselB wrote:I'm going to suggest that you insert a column between columns B and C (presuming that column B has your letters D and up, and C has your numbers)
That will now make your column with the numbers D. In the new column C enter

Code: Select all

=A1&B1
then copy that down for all the rows of your data.

Additionally, the VLOOKUP formula you posted is not correct...in a lot of ways. A VLOOKUP formula that would work (with the modifications I have suggested) would be like

Code: Select all

=VLOOKUP("AD";C1:D30;2;0)
Note: I use the same search parameter that you specified in your last post.

With these modifications, your current column D (which would become E) will be irrelevant
Good morning RusselB,
U REALLY MADE MY DAY!
IT works! really tnx man, I couldnt figure out how to do it and now all seems to function properly.
Really tnx man :D
Have a beutiful and nice day and CHEERS!
Marck!
Open office 4.1.6
Post Reply