ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula similar to DSUM (https://www.excelbanter.com/excel-discussion-misc-queries/144100-formula-similar-dsum.html)

Ben Blair

Formula similar to DSUM
 
I need to create a formula that acts like a combination of a SUMIF and a
VLOOKUP. I thought a DSUM would work, but haven't had any luck.

I have 2 sheets. The first contains Account numbers in the first column,
then 12 further columns for each of the months, containing dollar values.
Accounts may appear more than once on this sheet.

The second sheet has a column for the various accounts, each listed once.
Depending on how many months are "Actual" versus "Forecast", it needs to sum
a given column in the first sheet. So if six months are actuals, it would go
six columns over and sum all of the accounts (I have a reference cell setup
to count them and give a number).

A vlookup would be perfect if it could sum multiple accounts in the first
sheet. A sumif would be perfect if I could change the third term to go over
X number of columns depending on a certain cell. Since neither of these
seems to be possible, any help you could provide would be greatly appreciated.

Don Guillett

Formula similar to DSUM
 
try using this idea
=sumproduct((a2:a22=2344556)*(b2:b22="actual")*h2: h22)

--
Don Guillett
SalesAid Software

"Ben Blair" wrote in message
...
I need to create a formula that acts like a combination of a SUMIF and a
VLOOKUP. I thought a DSUM would work, but haven't had any luck.

I have 2 sheets. The first contains Account numbers in the first column,
then 12 further columns for each of the months, containing dollar values.
Accounts may appear more than once on this sheet.

The second sheet has a column for the various accounts, each listed once.
Depending on how many months are "Actual" versus "Forecast", it needs to
sum
a given column in the first sheet. So if six months are actuals, it would
go
six columns over and sum all of the accounts (I have a reference cell
setup
to count them and give a number).

A vlookup would be perfect if it could sum multiple accounts in the first
sheet. A sumif would be perfect if I could change the third term to go
over
X number of columns depending on a certain cell. Since neither of these
seems to be possible, any help you could provide would be greatly
appreciated.




All times are GMT +1. The time now is 01:52 PM.

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