+ Reply to Thread
Results 1 to 2 of 2

Look up table

  1. #1
    Registered User
    Join Date
    01-20-2022
    Location
    london
    MS-Off Ver
    2010
    Posts
    1

    Look up table

    I have some test data of electrical current measurements. For every measurement i would like to compare it against certain ranges of current. if it falls within one of these ranges then i would like to add the name of the range to the data.

    for example i have various ranges of current which are labelled. the first range C1 is between 7 and 69, range 2 is C2 and is between 78 to 105...... i wouild like to systematically go through my column of data and if the value is 45 it would put C1 in the next column. i would then cylcle through each row of data and check against my ranges.


    This all needs to be created in VBA, i did have an attempt at it but it was getting very clunky with IF statements, i was also strugling to systematically go though each row of data and perform the comparasion.

    any help would be appreciated. i have atatched a subset of data (the real data will have 50,000 entries)

    Claire
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,641

    Re: Look up table

    Hi there,

    Take a look at the attached version of your workbook and see if it does what you need. It uses the following code:

    Please Login or Register  to view this content.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

+ 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. Replies: 5
    Last Post: 06-12-2020, 01:55 PM
  2. Replies: 9
    Last Post: 02-01-2019, 07:10 AM
  3. Replies: 1
    Last Post: 03-25-2018, 04:16 PM
  4. Crosstab table to pivot table to plain table exceeds Excel row limit
    By jjsilva in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-30-2017, 11:43 PM
  5. Macro to fill 1st table with info from 2nd table. 2nd table search with 2 conditions
    By Ribeiro.JD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-17-2016, 02:03 PM
  6. [SOLVED] Adding a row in a table corrupts formula in a summary table (2nd table)
    By How How in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2015, 02:35 PM
  7. [SOLVED] Need a formula to sort a table into table (for a Table Plan) and name in column 2
    By jbpianoman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2012, 09:21 AM

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