View Single Post
  #15   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Breezy Breezy is offline
external usenet poster
 
Posts: 20
Default How can I make a cell = another cell based on a condition?

You all have helped me build my template thanks so much!!! I have another
question.

The template has information on it that needs to automatically transfer to
different workbooks. Such as:

If column G = a specific name then I need certain items in that row to
automatically transfer to the workbook that belongs to the specific name.
Can this be done?

I don't know if I'm making sense....

"Teethless mama" wrote:

Try this:

=SUM(SUMIFS(H:H,A:A,{"January","February","March"} ,C:C,{2008;2009}))


"breezy" wrote:

Thanks to all of you for your time this is a tremendous help!!!

Why won't my figures total 2008 when I write the function:
=SUM(SUMIFS(H:H,A:A,{"January","February","March"} ,C:C,{"2009","2008"}))

"Sheeloo" wrote:

Yes, it does.

I was in a hurry and just tested it with
=SUMPRODUCT(--(A4:A30={"January","February","March"}),G4:G30) hence the long
formula

SUMIFS also works if you pass it to SUM as shown by Teethless Mama so you
were right on ...



"Don Guillett" wrote:


My suggestion does work with sumproduct
=SUMPRODUCT(--(A4:A30={"January","February","March"})*G4:G30)
or
=SUMPRODUCT((A4:A30={"January","February","March"} )*G4:G30)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Sheeloo" <="to" & CHAR(95) & "sheeloo" & CHAR(64) & "hotmail.com" wrote in
message ...
Don,

I tested (with Excel 2007) the way you suggested but it did not work.

I believe that SUMIFS evaluates conditions with AND (all conditions should
be true)

One solution, in this limited case, would be

=SUMPRODUCT(--(A4:A30="January"),(G4:G30))+SUMPRODUCT(--(A4:A30="February"),(G4:G30))+SUMPRODUCT(--(A4:A30="March"),(G4:G30))
"Don Guillett" wrote:


I haven't worked with sumIFS but try
={"January","February","March"}
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"breezy" wrote in message
...
I need a number to equal the number in a cell another cell is January,
February, or March. I can make it work using only one month...
=SUMIFS(G4:G30,A4:A30,"=January") Thanks!! Breezy