+ Reply to Thread
Results 1 to 6 of 6

how to use the sum function through indirect or vlookup?

  1. #1
    Registered User
    Join Date
    12-16-2018
    Location
    Utah, USA
    MS-Off Ver
    Google Sheets/ Numbers
    Posts
    21

    how to use the sum function through indirect or vlookup?

    So I have attached my sheet.

    So I wrote the formula on R19 on the Power Level page of the attached sheet like this:

    =SUM((VLOOKUP(E8, INDIRECT($B$7&"!B12:Q194"), 16, 0))VLOOKUP(H8, INDIRECT($B$7&"!B12:Q194"), 16, 0)))

    For some reason the sum formula wont accept the 2 values to add everything inbetween from a separate sheet. How can I do this? I'm trying to see how much it would be TOTAL for the user to add in order to power level his great building from one level to another, and I depicted those 2 levels as cells: E8, and H8. So in this case from level 20 to level 74, and it should add ALL the values between the cells of those levels from the separate sheet of CE or whatever page I choose.

    Any ideas?
    Attached Files Attached Files
    Last edited by skyep2058; 01-12-2019 at 11:08 PM. Reason: mispelled title

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: how to use the sum function through indirect or vlookup?

    Please try

    =SUM(INDEX(INDIRECT($B$7&"!Q12:Q194"),MATCH(E8,INDIRECT($B$7&"!B12:b194"),)):INDEX(INDIRECT($B$7&"!Q12:Q194"),MATCH(H8,INDIRECT($B$7&"!B12:b194"),)))

  3. #3
    Registered User
    Join Date
    12-16-2018
    Location
    Utah, USA
    MS-Off Ver
    Google Sheets/ Numbers
    Posts
    21

    Re: how to use the sum function through indirect or vlookup?

    It gave me a value. Ill check to see if its working correctly. I had to add ROUND before SUM thought cuz it was giving me a decimal which I don't want.

  4. #4
    Registered User
    Join Date
    12-16-2018
    Location
    Utah, USA
    MS-Off Ver
    Google Sheets/ Numbers
    Posts
    21

    Re: how to use the sum function through indirect or vlookup?

    Appears to work as intended. Anyway to explain it to me?! I Understand the indirect function, what is match and index doing?

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: how to use the sum function through indirect or vlookup?

    Match
    https://support.office.com/en-us/art...rs=en-US&ad=US

    Index
    https://support.office.com/en-us/art...rs=en-US&ad=US

    The formula can be shortened to

    =SUM(INDEX(INDIRECT($B$7&"!Q12:Q194"),E8):INDEX(INDIRECT($B$7&"!Q12:Q194"),H8))


    =VLOOKUP(E8,INDIRECT($B$7&"!B12:Q194"),16,0)
    =INDEX(INDIRECT($B$7&"!Q12:Q194"),E8)
    For value, both work very similarly and give the value of 374.5 but in addition to value Index also give cell address.

    =INDEX(INDIRECT($B$7&"!Q12:Q194"),E8)
    =CE!Q31 =374.5

    Combined with another index with ":"
    =INDEX(INDIRECT($B$7&"!Q12:Q194"),E8):INDEX(INDIRECT($B$7&"!Q12:Q194"),H8)
    =CE!Q31:CE!Q85
    This gives the array of value from Q31 to Q85

    =SUM(INDEX(INDIRECT($B$7&"!Q12:Q194"),E8):INDEX(INDIRECT($B$7&"!Q12:Q194"),H8))
    =SUM(CE!Q31:CE!Q85)

    =10002.5

  6. #6
    Registered User
    Join Date
    12-16-2018
    Location
    Utah, USA
    MS-Off Ver
    Google Sheets/ Numbers
    Posts
    21

    Re: how to use the sum function through indirect or vlookup?

    Thank you Bo Ry! A lot of stuff but I super appreciate it!

+ 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] INDIRECT Function with multiple sheets - SUMIF, INDIRECT & MATCH
    By DJDRU in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-07-2014, 08:42 AM
  2. Sumif function using indirect function and data from different sheet
    By pronky007 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2013, 12:40 PM
  3. [SOLVED] Using ROW function inside of both an Indirect and Index function returns #VALUE
    By xandermacleod in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-11-2012, 06:22 PM
  4. vlookuo for text
    By Julsm2908 in forum Excel General
    Replies: 3
    Last Post: 10-10-2011, 07:53 AM
  5. Replies: 3
    Last Post: 01-04-2010, 10:16 PM
  6. Multiple IF with VLookuo
    By GazG in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-16-2009, 01:16 AM
  7. Vlookuo
    By Juran in forum Excel General
    Replies: 4
    Last Post: 02-20-2009, 09:40 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