Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 34
Default If statement or Vlookup in a range

Hi,

I have a range presented like a table;

ID Cost1 Value1 Cost2
Value2 TotalCost TotalValue

1 50 80 60
90 110 170
5 2000 2200 1000
2300 3000 4500
1 20 40 40
60 60 100
3 10 20 10
20 20 40
2 150 180 160
190 310 370

I want to be able to total all of the values in each colum where the
ID is the same.

Eg. for ID 1 I would like to total all Cost1 values (in this case
return 70), and all value1 values (120). However I could have up to
500 different ID's.

I know how to do an if statement on one line - eg.
=if(a1="1",a2,"")

However I would have to do this on every row for every ID. Is there an
easier way?

  #2   Report Post  
Posted to microsoft.public.excel.misc
KG KG is offline
external usenet poster
 
Posts: 33
Default If statement or Vlookup in a range

Sounds to me like a pivot table would give you what you need. Using SumIf
would probably work too but I think the pivot table would be easier to update.

"keri" wrote:

Hi,

I have a range presented like a table;

ID Cost1 Value1 Cost2
Value2 TotalCost TotalValue

1 50 80 60
90 110 170
5 2000 2200 1000
2300 3000 4500
1 20 40 40
60 60 100
3 10 20 10
20 20 40
2 150 180 160
190 310 370

I want to be able to total all of the values in each colum where the
ID is the same.

Eg. for ID 1 I would like to total all Cost1 values (in this case
return 70), and all value1 values (120). However I could have up to
500 different ID's.

I know how to do an if statement on one line - eg.
=if(a1="1",a2,"")

However I would have to do this on every row for every ID. Is there an
easier way?


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
Vlookup or If Statement? Confused Excel Discussion (Misc queries) 2 May 4th 07 09:47 AM
using vlookup within an if statement Sweetetc Excel Worksheet Functions 7 December 6th 06 05:54 PM
Vlookup with if statement HTC Excel Discussion (Misc queries) 0 November 30th 06 05:58 PM
Vlookup with if statement Dave F Excel Discussion (Misc queries) 0 November 30th 06 05:56 PM
If statement with Vlookup Marty Excel Worksheet Functions 1 March 30th 06 04:15 PM


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

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"