| View previous topic :: View next topic |
| Author |
Message |
jgreenlee Newbie

Joined: 15 Jun 2006 Posts: 3
|
Posted: Thu Jun 15, 2006 10:28 am Post subject: Using colons in cells causing me grief. |
|
|
I'm using VLOOKUP in a spreadsheet to take a MAC Address and lookup the associated host which lives in another worksheet. Unfortunately the results of my queries are pretty sporadic. For example...
10:00:00:00:C9:32:AA:BB
Is my reference MAC. I have the following formula that performs the lookup...
=IF($N23="";"";VLOOKUP($N23;systems_macs.$E$2:systems_macs.$F$100;2))
Instead of returning the proper value for that MAC address it returns the value for a completely different MAC address.
For giggles I removed all the colons from the reference MAC address and the target MAC address in my data worksheet which returned the proper system.
An interesting observation is that adding the first colon back (10:00...) returns a different MAC but still not the right one. (why it returns ANY result is beyond me because now the reference doesn't match ANY field in the lookup table.)
I formatted the cells in both columns of MACs as "text".
Why isn't the lookup working properly?
Thanks,
James
Last edited by jgreenlee on Thu Jun 15, 2006 10:54 am; edited 1 time in total |
|
| Back to top |
|
 |
jgreenlee Newbie

Joined: 15 Jun 2006 Posts: 3
|
Posted: Thu Jun 15, 2006 10:41 am Post subject: |
|
|
Okay...It appears that colons are a special opperand that causes Calc to do some "figgerin."
Using dots in place of the colons seems to fix my issue...But I would like to see my MAC's with colons instead. How can I get around this?
James |
|
| Back to top |
|
 |
ms777 Super User


Joined: 07 Feb 2004 Posts: 1355
|
Posted: Thu Jun 15, 2006 11:28 am Post subject: |
|
|
Hi,
if I remember correctly, VLOOKUP expects 4 parameter, not 3, and the last one must be 'false' for exact matches ... check the OO Basic help
Good luck,
ms777 |
|
| Back to top |
|
 |
Villeroy Super User


Joined: 04 Oct 2004 Posts: 10065 Location: Germany
|
|
| Back to top |
|
 |
jgreenlee Newbie

Joined: 15 Jun 2006 Posts: 3
|
Posted: Thu Jun 15, 2006 11:53 am Post subject: |
|
|
Much thanks guys...I never saw mention of the "fourth" parameter of VLOOKUP in the OOo tutorial.
Things usually work when you use them right.
Thanks!
James |
|
| Back to top |
|
 |
|