ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Sum values depending in values next column (https://www.excelbanter.com/excel-discussion-misc-queries/97827-sum-values-depending-values-next-column.html)

luiss

Sum values depending in values next column
 
Hi,

In one column I have the rates of different hotels, and in the next column I
have the names of the hotels. How can I sum all values for each hotel without
using Filter (this does not update automatically)?

Thanks and regards

Luis Serpa

Roger Govier

Sum values depending in values next column
 
Hi

One way
=SUMIF(B:B,"Hotel_required",A:A)

Better still, put the names of the hotels you want in say C1:C5 and
enter in D1
=SUMIF(B:B,C1,A:A)
Copy down through D2:D5

--
Regards

Roger Govier


"luiss" wrote in message
...
Hi,

In one column I have the rates of different hotels, and in the next
column I
have the names of the hotels. How can I sum all values for each hotel
without
using Filter (this does not update automatically)?

Thanks and regards

Luis Serpa




BenjieLop

Sum values depending in values next column
 

luiss Wrote:
Hi,

In one column I have the rates of different hotels, and in the next
column I
have the names of the hotels. How can I sum all values for each hotel
without
using Filter (this does not update automatically)?

Thanks and regards

Luis Serpa


This is probably what you need:

=SUMPRODUCT((A1:A100)*(B1:B100=\"HOTEL NAME\")

where

A1:A100 is the column that contains the different hotel rates AND
B1:B100 is the column that contains the different hotel names.

NOTE: Modify your column range to suit your needs.

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=558988


luiss

Sum values depending in values next column
 
Many thanks. Both solutions worked marvellously.

Luis

"BenjieLop" wrote:


luiss Wrote:
Hi,

In one column I have the rates of different hotels, and in the next
column I
have the names of the hotels. How can I sum all values for each hotel
without
using Filter (this does not update automatically)?

Thanks and regards

Luis Serpa


This is probably what you need:

=SUMPRODUCT((A1:A100)*(B1:B100=\"HOTEL NAME\")

where

A1:A100 is the column that contains the different hotel rates AND
B1:B100 is the column that contains the different hotel names.

NOTE: Modify your column range to suit your needs.

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=558988



BenjieLop

Sum values depending in values next column
 

Thanks for the feedback.

Regards.


--
BenjieLop


------------------------------------------------------------------------
BenjieLop's Profile: http://www.excelforum.com/member.php...o&userid=11019
View this thread: http://www.excelforum.com/showthread...hreadid=558988



All times are GMT +1. The time now is 02:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com