+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP and COUNTIF but kept getting errors

Hybrid View

  1. #1
    Registered User
    Join Date
    09-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    VLOOKUP and COUNTIF but kept getting errors

    I am doing a material takeoff from mechanical drawings (70 in total) and need to count the number of time a product code appears in a column. Then x it by the number of units needed in column next to the code. This will then give me the total number of products needed for the whole job. I was looking at VLOKUP and COUNTIF but kept getting errors. Any suggestions.

  2. #2
    Valued Forum Contributor
    Join Date
    09-07-2006
    Posts
    520

    Re: VLOKUP and COUNTIF but kept getting errors

    It sounds like your data being compared is inconsistent,
    ie you could be trying to match text numbers with real numbers or vice versa

    Try these variations:
    =vlookup(A2&"", ... )
    A2&"" will make the numeric product code into text nums, w/o impacting on its intrinsic value
    This presumes your reference lookup data (ie the 1st col in the range) are text numbers

    =vlookup(A2+0, ... )
    A2+0 will make the text number product code into real nums, w/o impacting on its intrinsic value
    This presumes your reference lookup data (ie the 1st col in the range) are real numbers
    -------
    Success? Celebrate it, hit the little star at the bottom left of my response
    Last edited by Max, Singapore; 09-17-2012 at 04:59 AM.

  3. #3
    Registered User
    Join Date
    09-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VLOKUP and COUNTIF but kept getting errors

    Hi Max - Thanks for looking at this, I will try it out and let you know how it goes. There are a few other comments too so I'll give them atry and should come up with a workable solution
    Kiwiscotsman
    Last edited by Cutter; 09-18-2012 at 04:22 PM. Reason: Removed whole post quote

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,454

    Re: VLOKUP and COUNTIF but kept getting errors

    VLOOKUP will only return the first entry for a code.

    It sounds as though you need to use SUMIF or SUMIFS to get the total number required.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  5. #5
    Registered User
    Join Date
    09-17-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VLOKUP and COUNTIF but kept getting errors

    Hi TMS - Never thought of SUMIF worth a try.

    Kiwiscotsman

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,454

    Re: VLOKUP and COUNTIF but kept getting errors

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1