#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default Smarter Idea

Hi All,
I have to check if there is data in B1:B3 (for example the entry '12') if
so, I need to add/sum the number that is written in the parallel cell in
A1:A3.
For example if in B1 = o,B2=12,B3=12 and in A1=1,A2=2,A3=3. then the total
(represent in cell C1) will be 5. I accomplished that by using IF sentence
for each entry. Is there a more smart way to do this?
Thanks a lot in advance

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Smarter Idea

=SUMIF(B1:B3,12,A1:A3)

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Lp12" wrote in message
...
Hi All,
I have to check if there is data in B1:B3 (for example the entry '12') if
so, I need to add/sum the number that is written in the parallel cell in
A1:A3.
For example if in B1 = o,B2=12,B3=12 and in A1=1,A2=2,A3=3. then the total
(represent in cell C1) will be 5. I accomplished that by using IF sentence
for each entry. Is there a more smart way to do this?
Thanks a lot in advance



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Smarter Idea

Try this in C1:

=SUMIF(B1:B3,12,A1:A3)

You can adjust the cell references for longer ranges, eg:

=SUMIF(B1:B15,12,A1:A15)

which you would not be able to do in your IF statements.

Hope this helps.

Pete

On Mar 6, 9:19 am, Lp12 wrote:
Hi All,
I have to check if there is data in B1:B3 (for example the entry '12') if
so, I need to add/sum the number that is written in the parallel cell in
A1:A3.
For example if in B1 = o,B2=12,B3=12 and in A1=1,A2=2,A3=3. then the total
(represent in cell C1) will be 5. I accomplished that by using IF sentence
for each entry. Is there a more smart way to do this?
Thanks a lot in advance



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default Smarter Idea

Look in HELP for the SUMIF() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Lp12" wrote in message ...
| Hi All,
| I have to check if there is data in B1:B3 (for example the entry '12') if
| so, I need to add/sum the number that is written in the parallel cell in
| A1:A3.
| For example if in B1 = o,B2=12,B3=12 and in A1=1,A2=2,A3=3. then the total
| (represent in cell C1) will be 5. I accomplished that by using IF sentence
| for each entry. Is there a more smart way to do this?
| Thanks a lot in advance
|


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 54
Default Smarter Idea

it worked up gr8....
I can't believe i missed it...
Thanks a lot y'all...

"Niek Otten" wrote:

Look in HELP for the SUMIF() function

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Lp12" wrote in message ...
| Hi All,
| I have to check if there is data in B1:B3 (for example the entry '12') if
| so, I need to add/sum the number that is written in the parallel cell in
| A1:A3.
| For example if in B1 = o,B2=12,B3=12 and in A1=1,A2=2,A3=3. then the total
| (represent in cell C1) will be 5. I accomplished that by using IF sentence
| for each entry. Is there a more smart way to do this?
| Thanks a lot in advance
|



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
Help!! No idea where to go next... TJaques Excel Discussion (Misc queries) 4 February 28th 07 08:22 PM
I've no idea how to do this. :( MagnoliaSouth Excel Worksheet Functions 3 June 28th 06 09:07 PM
any idea? CC Links and Linking in Excel 1 May 12th 05 12:37 AM
any idea?? NF Excel Worksheet Functions 1 April 24th 05 02:51 AM
Help Please. No Idea what to look for or how to do this David Chadwick ([email protected]) Excel Discussion (Misc queries) 0 February 28th 05 04:19 PM


All times are GMT +1. The time now is 09:39 PM.

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

About Us

"It's about Microsoft Excel"