Forum Discussion

MNOP_'s avatar
MNOP_
Copper Contributor
Feb 05, 2022
Solved

Matching data in one column based on data in another column

I have a column of actual temperatures. I have another column of a range of temperatures and a further column with associated electrical load for each temperature in the range. What I require is for excel to look at my actual temperature and create a column of electrical load data that matches the electrical load for that specific temperature from the range. Tried vlookup with no luck. Thanks
  • MNOP_ Assuming the reference temperature -3 is in cell A2, try this:

    =VLOOKUP(C2,$A$2:$B$38,2,FALSE)

    or, of you are using Excel MS365 or 2021, try this:

    =XLOOKUP(C2:C38,A2:A38,B2:B38)

6 Replies

  • mtarler's avatar
    mtarler
    Silver Contributor

    MNOP_ I suspect the lookup range with the "range of temperatures" looks something like
    60 - 69
    70 - 79
    80 - 89
    but excel doesn't understand those ranges as numbers, just text.
    I suggest splitting those into 2 columns call them Range Low and Range High (or whatever you like)
    Then you can use any of the Lookup functions. (note the 2nd column is really just for viewing because the lookup formula just uses the 1 column because it assumes it is in order and continuous)

     

    • MNOP_'s avatar
      MNOP_
      Copper Contributor

      mtarler  Thank you so much for your reply. its actually not a range. A have a list of temp values (column A) that has a load profile (column B). Now need to match the actual temp (column C) with a matched load from the load data. For example,  the first row at 15 deg should pop up the number 24214 kW. I have over 8700 rows to do this for 🙂 

       

      thanks again for your help and excel example. Very kind of you.  

       

      TEMP data reference points Temperature Variable Load (kW)   reference data points Actual Time variable Temp Actual Matched Load ? 
      -323180.115 
      -223215.014 
      -123256.414 
      023311.915 
      123381.718 
      223479.921 
      323615.523 
      423603.425 
      523627.427 
      623691.428 
      723739.928 
      823817.028 
      923848.128 
      1023885.328 
      1123930.90 
      1223998.025 
      1324061.422 
      1424133.421 
      1524214.020 
      1624303.519 
      1724401.618 
      1824500.217 
      1924660.117 
      2024748.416 
      2124956.215 
      2225172.215 
      2325435.714 
      2425720.3-3 
      2526042.818 
      2626413.121 
      2726825.121 
      2827018.321 
      2927135.910 
      3027258.921 
      3127386.121 
      3227518.6-2 
      3327657.521 

Resources