[Solved] VLOOKUP Text w/ + Operator

Discuss the spreadsheet application
Post Reply
brantlymedders
Posts: 2
Joined: Wed Dec 21, 2011 7:17 pm

[Solved] VLOOKUP Text w/ + Operator

Post by brantlymedders »

I'm having some issues with VLOOKUP.

Essentially, I have a spreadsheet with two sheets, designated Rubric and Data.

Rubric looks like this:
Column C contains a dropdown list with the following possibilities: A+, A, A-, B+, B, B-, C+, C, C-, D+, D, D-, F.
Column D contains the following formula: =VLOOKUP(C5, Data!A2:B14, 2, FALSE)

Data Looks like this:
Column A lists A+, A, A-, B+, B, B-, C+, C, C-, D+, D, D-, F.
Column B lists these decimals that correspond to the above letter values: .98, .95, .92, .88, .85, .82, .78, .75, .72, .68, .65, .62, .55

However, when I use the VLOOKUP function on any value containing the "+" (i.e. A+, B+, C+, D+, I get the value that would correspond to the unmodified value (i.e. A+ yields .95, which should correspond to A, B+ yields .85, which should correspond to B). Interestingly enough, the values containing "-" work fine.

Lastly, these formulas work perfectly in Google Docs.

I have the cells that contain the letter values formatted as text in both sheets.

Can someone help me sort this issue out?
Last edited by Hagar Delest on Wed Dec 21, 2011 10:03 pm, edited 1 time in total.
Reason: tagged [Solved].
LibreOffice 3.3 on Ubuntu Oneiric
User avatar
Villeroy
Volunteer
Posts: 31363
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: VLOOKUP Text w/ + Operator

Post by Villeroy »

Tools>Options>Calc>Calculation
Turn off all check boxes except the "Match Whole Cell" option.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
JohnSUN-Pensioner
Volunteer
Posts: 876
Joined: Fri Jan 14, 2011 1:21 pm
Location: Kyiv, Ukraine

Re: VLOOKUP Text w/ + Operator

Post by JohnSUN-Pensioner »

Welcome to forum!

Try to disable "use regular expressions in formulas"to this workbook

Oh! Villeroy shoots faster ... :D
Attachments
RegularExpressionInFormulas.JPG
Last edited by JohnSUN-Pensioner on Wed Dec 21, 2011 7:51 pm, edited 1 time in total.
I may not have a lot to give but what I got I'll give to you...
Apache OpenOffice 4.1.5, LibreOffice 6.4.4.2 (x64) on Windows 7
If you think that I did not answer your question, make allowances for my imperfect English
gerard24
Volunteer
Posts: 958
Joined: Sat Oct 30, 2010 5:12 pm
Location: France

Re: VLOOKUP Text w/ + Operator

Post by gerard24 »

+ is a special character.

1. Menu Tools > Options > LO Calc > Calculate, turn of "Enable regular expressions in formulas".
or
2. Replace =VLOOKUP(C5, Data!A2:B14, 2, FALSE) by
=VLOOKUP(SUBSITUTE(C5,"+","\+"), Data!A2:B14, 2, FALSE)
Special characters are . ^ $ * + ? \ [ ( { | , use escape character \ before special characters if regular expressions is enabled.
LibreOffice 6.4.5 on Windows 10
brantlymedders
Posts: 2
Joined: Wed Dec 21, 2011 7:17 pm

Re: VLOOKUP Text w/ + Operator

Post by brantlymedders »

Thank you all so much for your help.
LibreOffice 3.3 on Ubuntu Oneiric
Post Reply