Finding a number.................

sssb2000

Well-known Member
Joined
Aug 17, 2004
Messages
1,169
hello everyone,
i have the following range: A1:B10
in A1:A10, i have a formula that populates the cells with numbers. Only one of these cells can/will have a number in it at any given time.

In B1:B10, i have a static number for each cell.

Now, in C1, i need a formula that says: if A1 is non-zero, then add the value of A1 to B1 and report it in C1 ..... OR....if A2 is non-zero, then add the value of A2 to B2 and report in C1....OR....(same all the way to A10).

how can i do this without an IF statement?
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
hello everyone,
i have the following range: A1:B10
in A1:A10, i have a formula that populates the cells with numbers. Only one of these cells can/will have a number in it at any given time.

In B1:B10, i have a static number for each cell.

Now, in C1, i need a formula that says: if A1 is non-zero, then add the value of A1 to B1 and report it in C1 ..... OR....if A2 is non-zero, then add the value of A2 to B2 and report in C1....OR....(same all the way to A10).

how can i do this without an IF statement?
One way...

Book1
ABC
1_2286
2_41_
3_16_
4_57_
56026_
6_43_
7_62_
8_42_
9_29_
10_20_
Sheet1

This formula entered in C1:

=MAX(A1:A10)+SUMIF(A1:A10,"<1E100",B1:B10)
 
Upvote 0
that didn't work.....it just added everything in column B and put it in C1.
my column A has all zeros and only one cell that has a non-zero value.
 
Upvote 0
that didn't work.....it just added everything in column B and put it in C1.
my column A has all zeros and only one cell that has a non-zero value.
Are there any negative numbers in A1:A10?

If not then try this:

=MAX(A1:A10)+SUMIF(A1:A10,">0",B1:B10)
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top