Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to use HLOOKUP to sum a range of values in Excel?

Author Sun Last modified

In general, you may use lookup formula to lookup a value from a list or a range, but have you ever tried to sum a range of values by using HLOOKUP formula? For example, here is a range of data with name list and score list, and now you want to find the name Oliver, and calculate the sum of her all scores as below screenshot shown. Now, this article, will tell you how to use HLOOOKUP to quickly sum a range of values based on a specific value in Excel.

A screenshot showing a dataset where HLOOKUP is used to sum values based on a name

Use HLOOKUP to sum values based on a specific value


arrow blue right bubble Use HLOOKUP to sum values based on a specific value

Here I introduce some formulas to help you quickly sum a range of values based on a value.

Select a blank cell you want to place the summing result, enter this formula =SUMPRODUCT(HLOOKUP(B15,A1:M12,{2,3,4,5,6,7,8,9,10,11,12},0)) and press Enter key, now you get the summing result.

Tip: In the formula, B15 is the value you want to sum based on, and A1:M12 is the data range, 2,3…12 is the rows you want to sum up, you can change them as you need.
A screenshot showing the HLOOKUP to sum values in Excel

If you want to sum every nth rows based on one specific values, you can use this formula =SUMPRODUCT(HLOOKUP(P1,A1:M12,{2,4,6,8,10,12},0))
A screenshot showing how to sum every nth row with HLOOKUP in Excel

There is another case, for example, you have a table recording the hours every date cost as below screenshot shown, and now you want to calculate the sum of hours from date 1 to 11, how can you quickly solve?
A screenshot showing a time-based dataset to calculate sum between specific dates in Excel

1. Select the time data, and give them a range name. See screenshot:
A screenshot showing how to name a time range for sum calculations in Excel

2. Then select a blank cell where you want to place the result, and enter this formula =SUM(INDEX(Time,A25):INDEX(Time,B25)), press Enter key to get to result.

Tip: A25 is the specified column number from which you will sum hours in the named range of Time, B25 is the specified column number to which you will sum hours in the named range of Time, and Time is the range name you gave for the time data range.
A screenshot showing the result of summing values between two dates using named ranges in Excel

Quickly Count/Sum cells by background or format color in Excel

In some cases, you may have a range of cells with multiple colors, and what you want is to count/sum values based on same color, how can you quickly calculate?

With Kutools for Excel's Count by Color, you can quickly do many calculations by color, and also can generate a report of the calculated result. Download Kutools and try it today!

Kutools for Excel - Supercharge Excel with over 300 essential tools. Enjoy permanently free AI features! Get It Now


Best Office Productivity Tools

šŸ¤– Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions…
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in