New to excel functions...

  • Thread starter R Green - WoWsat.com
  • Start date
R

R Green - WoWsat.com

Hi... I'm trying to create an invoice in excel and ask the function to
perform this:

let's say I have two columns. The first (A) column I have a price amount,
while the second (B) column to the right of the first I have a column that I
can add a "P" (for provincial sales tax) or a "G" for GST tax.

What function can I use to ask the excel to look for the B column for "P"
and if there's a P, then add the amount immediately to the left of that
cell? I would imagine using some sort of array function, but I'm a little
confused about using arrays.

Any help would be appreciated!

Thanks
 
G

Guest

You can use an IF statement as follows:
=IF(B1="G",7%,IF(B1="P",9%,""))
This will mean that B=7%, P=9% and Nothing = nothing
You'll have to create this in column C and autofill this
down for as many rows as necessary. You can then add A1
and C1 to get a total plus tax.
If there's anything else, please feel free to contact me
directly.
HTH
Kevin M
 
K

Kevin McClement

Sorry, forgot to include my info last post.
Kevin.
-----Original Message-----
You can use an IF statement as follows:
=IF(B1="G",7%,IF(B1="P",9%,""))
This will mean that B=7%, P=9% and Nothing = nothing
You'll have to create this in column C and autofill this
down for as many rows as necessary. You can then add A1
and C1 to get a total plus tax.
If there's anything else, please feel free to contact me
directly.
HTH
Kevin M
the
B column for "P"
.
 
D

drabbacs

Sounds like you want to use sumif. At the bottom of column
A (or wherever you want to total to appear) type this:

=sumif(Bfirst:Blast,"P",Afirst:Alast)

where Afirst if the cellname for the first entry in column
A you want to sum, Bfirst is the cellname for the first
entry in B, and Alast, Blast are the last ones.

example

A B
1 22.5 P
2 15.0 q
3 47.0 P

then in a4 =sumif(B1:B3,"P",A1:A3)

would return the total of A1 and A3 because B1 and B3 are
equal to "P"

Good Luck
 
R

R Green - WoWsat.com

Although it was not the most efficient way to do the function, at least
you've enlightened me on the approach of getting it done!

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top