Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default formula help please

i know i've seen something like this, but i don't know if it's sum(if,
sumif, or sumproduct:

anyway

2 columns of numbers

i need to add up the 1st column, but if the number in the cell to the right
of it is greater than that number, i need to add that number instead.

1 0
2 0
3 5
4 0

12
should be the sum


thanks
--


Gary



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default formula help please

Hi Gary,

The first thing that comes to mind is to add a column of formulas to the
right (Column C if the other two Columns are A and B). The formula would be:

=IF(A1<B1,B1,A1)

This will return the value in B1 if it's greater than A1, or A1 if it's
bigger. Then SUM the values in Column C to get your total (12 as shown in
your example). If I think of a way to do it without adding a Column I'll post
up. This is what popped into my head first.

Hope that helps.

Regards,
James

"Gary Keramidas" wrote:

i know i've seen something like this, but i don't know if it's sum(if,
sumif, or sumproduct:

anyway

2 columns of numbers

i need to add up the 1st column, but if the number in the cell to the right
of it is greater than that number, i need to add that number instead.

1 0
2 0
3 5
4 0

12
should be the sum


thanks
--


Gary




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default formula help please

i guess that's one way of doing it, thanks james

--


Gary


"JS2004R6" wrote in message
...
Hi Gary,

The first thing that comes to mind is to add a column of formulas to the
right (Column C if the other two Columns are A and B). The formula would
be:

=IF(A1<B1,B1,A1)

This will return the value in B1 if it's greater than A1, or A1 if it's
bigger. Then SUM the values in Column C to get your total (12 as shown in
your example). If I think of a way to do it without adding a Column I'll
post
up. This is what popped into my head first.

Hope that helps.

Regards,
James

"Gary Keramidas" wrote:

i know i've seen something like this, but i don't know if it's sum(if,
sumif, or sumproduct:

anyway

2 columns of numbers

i need to add up the 1st column, but if the number in the cell to the
right
of it is greater than that number, i need to add that number instead.

1 0
2 0
3 5
4 0

12
should be the sum


thanks
--


Gary






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default formula help please

Hi Gary

The array entered formula, (commit with Control-Shift-Enter, not just Enter)
{=SUM(IF(G1:G4H1:H4,G1:G4,H1:H4)))}

Don't enter the curly braces { }, Excel will include them when you use
Ctrl-Shift-Enter

Regards

Roger Govier



Gary Keramidas wrote:

i know i've seen something like this, but i don't know if it's sum(if,
sumif, or sumproduct:

anyway

2 columns of numbers

i need to add up the 1st column, but if the number in the cell to the right
of it is greater than that number, i need to add that number instead.

1 0
2 0
3 5
4 0

12
should be the sum


thanks


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default formula help please

thanks roger, i was close

i didn't save any of my attempts, but i think i had the same references as
you, but i think i was using sumproduct,.

thanks
--


Gary


"Roger Govier" wrote in message
...
Hi Gary

The array entered formula, (commit with Control-Shift-Enter, not just
Enter)
{=SUM(IF(G1:G4H1:H4,G1:G4,H1:H4)))}

Don't enter the curly braces { }, Excel will include them when you use
Ctrl-Shift-Enter

Regards

Roger Govier



Gary Keramidas wrote:

i know i've seen something like this, but i don't know if it's sum(if,
sumif, or sumproduct:

anyway

2 columns of numbers

i need to add up the 1st column, but if the number in the cell to the
right of it is greater than that number, i need to add that number
instead.

1 0
2 0
3 5
4 0

12
should be the sum


thanks





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default formula help please

=SUM(IF(A1:A10B1:B10,A1:A10,B1:B10))

as an array formula, so commit with Ctrl-Shift-Enter

--
HTH

Bob Phillips

"Gary Keramidas" wrote in message
...
i guess that's one way of doing it, thanks james

--


Gary


"JS2004R6" wrote in message
...
Hi Gary,

The first thing that comes to mind is to add a column of formulas to the
right (Column C if the other two Columns are A and B). The formula would
be:

=IF(A1<B1,B1,A1)

This will return the value in B1 if it's greater than A1, or A1 if it's
bigger. Then SUM the values in Column C to get your total (12 as shown

in
your example). If I think of a way to do it without adding a Column I'll
post
up. This is what popped into my head first.

Hope that helps.

Regards,
James

"Gary Keramidas" wrote:

i know i've seen something like this, but i don't know if it's sum(if,
sumif, or sumproduct:

anyway

2 columns of numbers

i need to add up the 1st column, but if the number in the cell to the
right
of it is greater than that number, i need to add that number instead.

1 0
2 0
3 5
4 0

12
should be the sum


thanks
--


Gary








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Commenting custom formula fields/formula on formula editor Muxer Excel Programming 2 July 24th 03 01:02 AM


All times are GMT +1. The time now is 11:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"