Using sum functions with Hlookup . Help Required !

tglancy

New Member
Joined
Sep 12, 2002
Messages
10
I currently have the following function code :- It works but is there a far tidier way of doing this with a SUM (or similar) function ? Many Many thanks.

=HLOOKUP("tot_prem",'Column Output'!A:BW,8,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,9,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,10,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,11,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,12,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,13,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,14,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,15,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,16,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,17,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,18,FALSE)/1000+HLOOKUP("tot_prem",'Column Output'!A:BW,19,FALSE)/1000
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
What about naming the range "column_output" and then putting in the formula;

=sum(column_output)/1000

hope this helps.
 
Upvote 0
A few words describing your challenge is often very useful.

If you know where the information is, try

=SUM('Column Output'!C8:C19)/1000

If the criteria is in just one unspecified heading, try

=SUM(OFFSET('Column Output'!A1,7,MATCH("tot_prem",'Column Output'!A1:G1,0)-1,12,1))/1000
 
Upvote 0
Thanks Dave and Jimboy..

I should have described this further. I need to retain the hlookup facility as the 'Column Output' Worksheet is prone to change. Is there a way that I can sum the results of an HLOOKUP with less code than I specified earlier ?

Thanks again for your help.
 
Upvote 0
On 2002-09-19 07:09, tglancy wrote:
Thanks Dave and Jimboy..

I should have described this further. I need to retain the hlookup facility as the 'Column Output' Worksheet is prone to change. Is there a way that I can sum the results of an HLOOKUP with less code than I specified earlier ?

Thanks again for your help.


try the Match Offset combination described above

1. with minor changes

=HLOOKUP("Tot_Prem",A1:BW2,2,0)/1000

2. VBA instead of direct formulas

etc
This message was edited by Dave Patton on 2002-09-20 07:12
 
Upvote 0

Forum statistics

Threads
1,218,746
Messages
6,144,265
Members
450,533
Latest member
xoxo1998

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top