SOLVED

New Contributor

# SUMIF for first values only

Hello all,

Would like some help pls ..

I have a spreadsheet setup as follows:

In column E i would like to show the budget once for each GL per month .. so in Jan i only want to see 58,937 as the budget for GL 57010104..

Help much appreciated

7 Replies

# Re: SUMIF for first values only

In cell E9 you could try =IF( AND( A9=A8, B9=B8), D8, 0 ) then copy that formula to the other cells in that column

# Re: SUMIF for first values only

Thanks @Wyn Hopkins , but it doesn't seem to work .. maybe i am explaining it wrong ..

attached is my file with periods Jan -Dec - within each period i have duplicate GL account lines - in the actual column i want to show for each month the budget value for the GL only once ..

Thanks for your time

# Re: SUMIF for first values only

Sorry, your sample confuses. You say budget for each account shall be shown once per month.

In the sample for the accounts which are not duplicates you show nothing, for repeating budget you ignore only first record and keep all the rest. Which exactly result do you expect?

# Re: SUMIF for first values only

Hello @Sergei Baklan  .. the above pic is the result from the formula suggested by @Wyn Hopkins  ..(which does not quite work out)

I need column E to show only the first value of the budget for that GL (for that month) .. i.e GL 57010107 on row 12 should show 8,333 in column E ....  E14 and E15 should show zero as the GL is a duplicate for Jan .. similarly costs relating to Feb should show 8,333 in E76 and zero values for E77 and E78 ..

Hope this clarifies

Thanks for your time

best response confirmed by arumel (New Contributor)
Solution

# Re: SUMIF for first values only

If like this

formula is

``=IF(COUNTIFS(\$A\$1:\$A2,A2,\$B\$1:\$B2,B2)>1,0,D2)``

# Re: SUMIF for first values only

thanks so much @Sergei Baklan  .. that work.

Have a great day

# Re: SUMIF for first values only

@arumel , you are welcome, glad to help