+ Reply to Thread
Results 1 to 3 of 3

vba excel match whole numbers

  1. #1
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Microsoft 365 Apps
    Posts
    518

    vba excel match whole numbers

    I want to evaluate and match one range with another and return the offset value of the other. My issue is that both ranges may contain decimals that will not be identical; however, the ordinary whole number will match. I was wondering if there was a way to evaluate (pseudocode) Application.WorksheetFunction.Round(.Range("D2:D" & sRow), 0) without having to create a worker range. Also there are multiple whole number values (different decimals) so only returning the first match.

    ws1[A] ws2[D] ws2[A]
    1000.42
    1001.1 1001.02 1005 <--------- match
    1001.34 1006
    1001.90 1007
    1002.7 1002.27 1008 <--------- match
    ...
    2003.90 2043
    2004.3 2004.10 2044 <--------- match
    2004.83 2045
    ...
    3000 3000.3 3100 <--------- match
    ...

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: vba excel match whole numbers



    Maybe it's about:

    1. vba function "Fix"
    or equivalent in worksheet
    2. functions "Trunc" and "Sign" (an example in the attachment)

    ?
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    02-25-2013
    Location
    Colorado, US
    MS-Off Ver
    Microsoft 365 Apps
    Posts
    518

    Re: vba excel match whole numbers

    Thanks porucha, but i went a different direction and was able to figure it out. Thanks for the reply.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Match not finding a match in a table when headers are numbers.
    By pxtaylor in forum Excel General
    Replies: 9
    Last Post: 06-07-2019, 04:08 PM
  2. Replies: 2
    Last Post: 12-12-2018, 05:00 AM
  3. [SOLVED] how to seperate numbers that match 2 numbers from a list.
    By notmyday in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-28-2016, 07:51 AM
  4. how to seperate numbers that match 2 numbers from a list.
    By notmyday in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-28-2016, 07:30 AM
  5. Finding TWO numbers from a range of numbers to match a target value
    By Eero in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2014, 10:08 AM
  6. Match up numbers in excel
    By kuzna26 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-16-2014, 01:48 PM
  7. [SOLVED] Application.Match help. Find a match if first 4 numbers are the same. Asterisk not working
    By thelisa in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-24-2013, 08:01 AM

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