vlookup not working

I have a spreadsheet that won't calculate a vlookup. The formula displays as the formula, not the result. In the formula dialog box, it displays an answer for the lookup (I don't know if the answer is correct) and if I click into the formula, it displays the cell references as I'd expect. It just doesn't want to actually display the result. Formula is:

=VLOOKUP(A2;Contacts.$B$1:$C$2183;2;0)

The vlookup uses static lookup array (hence the $ symbols). I first tried this in Excel on another computer and had the same problem. Tried forcing the calculation and setting the file to auto-calculate, but no joy. Then opened it in Calc, saved as ODS, then tried again and I'm getting the same problem.

What's more, the relative reference to A2, which should change as the location of the lookup changes, doesn't change, so it always references A2.

Any wisdom is greatly appreciated.

I have a spreadsheet that won't calculate a vlookup. The formula displays as the formula, not the result.

I can think of two possibilities:

o You have Calc configured to display formulae, not results. Go to Tools | Options... | LibreOffice Calc | View | Display. Is Formulas ticked? Remove the tick.

o The cell into which you typed the formula was formatted as Text before you did so. So what you have is a text string which happens to look like a formula, not a formula. After you have changed the formatting, you will need to retype or re-paste an entry and then fill it down the column again to correct this.

What's more, the relative reference to A2, which should change as the location of the lookup changes, doesn't change, so it always references A2.

That suggests the second possibility.

I trust this helps.

Brian Barker

Thanks, Brian. I finally got a chance to look at this, and it appears it was, in fact, formatted to text (though I can't figure out how that would have happened b/c I didn't do anything before setting up the formula). When I set it to General, it worked. I appreciate your help!

Carl