• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Vlookup Issue|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / Vlookup Issue|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…Vlookup Issue
sp_PrintTopic sp_TopicIcon
Vlookup Issue
Avatar
Brandie Blair

New Member
Members
Level 0
Forum Posts: 2
Member Since:
September 9, 2023
sp_UserOfflineSmall Offline
1
September 9, 2023 - 4:14 am
sp_Permalink sp_Print

I have a really odd thing happening with a vlookup, where it is randomly bringing back incorrect values. The only common denominator I can find is it's only happening with whole numbers. But even that is random. Some whole #'s are fine. I've included examples of both in the attached sample file.

Now, here's the crazy part...In the attached sample (where I have those highlighted with red) if you were to manually type over the # in the "Actual" column using the EXACT same # - it will then output the correct segment?!?! I cannot figure this out and hoping it's an easy fix and something I'm simply overlooking. 
Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4614
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
2
September 9, 2023 - 10:57 am
sp_Permalink sp_Print

Hi Brandie,

Welcome to our forum! 

The file didn't get attached. You need to click 'start upload' after selecting your file, then wait for the grey check mark beside the file size before clicking 'submit reply'.

However, from what you described, my guess is that the numbers you're seeing that you then type over and are correctly found, are text, not numbers. When you type over them it fixes the number format to a number.

These numbers may have an apostrophe at the front of them that's only visible from the formula bar, or they might have leading or trailing spaces.

If you're still stuck, come back and attach your file and we'll take a look.

Mynda

Avatar
Brandie Blair

New Member
Members
Level 0
Forum Posts: 2
Member Since:
September 9, 2023
sp_UserOfflineSmall Offline
3
September 9, 2023 - 6:25 pm
sp_Permalink sp_Print

Hoping it attaches this time. Thank you so much!

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 880
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
4
September 10, 2023 - 2:19 am
sp_Permalink sp_Print

Hello,

Can’t really explain why it behaves like this, but if you round the calculation in column G you get correct result back from your lookup. But I agree, it is strange.

Br,
Anders

Avatar
Mynda Treacy
Admin
Level 10
Forum Posts: 4614
Member Since:
July 16, 2010
sp_UserOfflineSmall Offline
5
September 10, 2023 - 12:12 pm
sp_Permalink sp_Print

It'll be a floating point problem. Although what you see in the cell might be 200.000000' for example, in the actual underlying XML file it's probably 199.9999999 

Hence, why rounding fixes the issue.

Mynda

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 688
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
6
September 11, 2023 - 7:16 pm
sp_Permalink sp_Print

Where did the data in column D come from? That's where the problem actually originates, since as Mynda said, although the values look like whole numbers, internally they are being stored as values like 199.9999999999994 and 200.00000000003

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Susan VanRiper, Tracy English, David Panthol, Mohamed Touahria
Guest(s) 10
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
jaryszek: 183
Newest Members:
David von Kleek
Ronald White
Ginette Guevremont
Taryn Ambrosi
Mark Davenport
Christy Nichols
Harald Endres
Ashley Hughes
Herbie Key
Trevor Pindling
Forum Stats:
Groups: 3
Forums: 24
Topics: 6528
Posts: 28594

 

Member Stats:
Guest Posters: 49
Members: 32817
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.