View Single Post
 
Old 01-16-2019, 11:22 PM
Bumba Bumba is offline Windows 7 32bit Office 2010
Novice
 
Join Date: Jan 2019
Posts: 26
Bumba is on a distinguished road
Default Using SUM and VLOOKUP formula together in to fetch data from multiple cells?

Say I have an excel file which looks like below:



How do I get values of all the columns in below table fields Quarter-1, Quarter-2, Quarter-3, Quarter-4 in one go, where Quarter-1 is the sum of the values from Jan--2018 to Mar--2018 in the above table, Quarter-2 is the sum of the values from Apr--2018 to Jun--2018 etc.

Now, I've written the below formula's in Quarter-1, Quarter-2, Quarter-3, Quarter-4 respectively

Code:
{=SUM(VLOOKUP([@Name],Table1[[#All],[Name]:[Dec--2018]],{2,3,4},0))}

{=SUM(VLOOKUP([@Name],Table1[[#All],[Name]:[Dec--2018]],{5,6,7},0))}

{=SUM(VLOOKUP([@Name],Table1[[#All],[Name]:[Dec--2018]],{8,9,10},0))}

{=SUM(VLOOKUP([@Name],Table1[[#All],[Name]:[Dec--2018]],{11,12,13},0))}
But can I do this using a single formula and not need to change the column index array values in every column?
Attached Files
File Type: xlsx Test.xlsx (13.4 KB, 13 views)
Reply With Quote