ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Formula Error (https://www.excelbanter.com/excel-discussion-misc-queries/116562-formula-error.html)

Killer

Formula Error
 
Im trying to create a formula and Im having a little problem getting it to
work correctly.

Heres the formula:
=COUNTIF(G4:G197,"Y")+(F4:F197)-500

If anything in G4:G197 = Y
I want it to add the numbers from (F4:F197) and subtract it from 500

G5____F5________G6______F6______G7______F7
Y_____$50________ Y _____$100_______ N _____$200

Total $150-$500 =$350

Any help would be appreciated.


kassie

Formula Error
 
=500-SUMIF(G4:G197,"Y",F4:F197), or if you want a negative result (using your
example) =SUMIF(G4:G197,"Y",F4:F197)-500

"Killer" wrote:

Im trying to create a formula and Im having a little problem getting it to
work correctly.

Heres the formula:
=COUNTIF(G4:G197,"Y")+(F4:F197)-500

If anything in G4:G197 = Y
I want it to add the numbers from (F4:F197) and subtract it from 500

G5____F5________G6______F6______G7______F7
Y_____$50________ Y _____$100_______ N _____$200

Total $150-$500 =$350

Any help would be appreciated.


Killer

Formula Error
 
Thank you very that worked perfected your a lifesaver

"kassie" wrote:

=500-SUMIF(G4:G197,"Y",F4:F197), or if you want a negative result (using your
example) =SUMIF(G4:G197,"Y",F4:F197)-500

"Killer" wrote:

Im trying to create a formula and Im having a little problem getting it to
work correctly.

Heres the formula:
=COUNTIF(G4:G197,"Y")+(F4:F197)-500

If anything in G4:G197 = Y
I want it to add the numbers from (F4:F197) and subtract it from 500

G5____F5________G6______F6______G7______F7
Y_____$50________ Y _____$100_______ N _____$200

Total $150-$500 =$350

Any help would be appreciated.



All times are GMT +1. The time now is 12:54 PM.

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