#1   Report Post  
Posted to microsoft.public.excel.misc
KJ KJ is offline
external usenet poster
 
Posts: 43
Default vlookup question

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default vlookup question

Hi,
Could you please post your formula, thanks

"KJ" wrote:

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.misc
KJ KJ is offline
external usenet poster
 
Posts: 43
Default vlookup question

I gave range names to each of the data sets Q1, Q2, ....

On the summary tab, my formula is: vlookup(unit # cell, Q1, 4- column with
the first subtotal I need,false)+vlookup(unit # cell, Q2, 4,
false)+vlookup(unit # cell, Q3, 4, false)+vlookup(unit # cell, Q4, 4, false)

Obviously if this unit # was added in quarter 3, it will return an error.
Hope this helps.

"Eduardo" wrote:

Hi,
Could you please post your formula, thanks

"KJ" wrote:

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default vlookup question

Hi,
try

=SUMPRODUCT(--(A1=Sheet2!A1:A9),Sheet2!B1:B9)+SUMPRODUCT(--(A1=Sheet3!A1:A9),Sheet3!B1:B9)

Change the above formula to fit your needs you will have to add to more + in
order to get Q3 and Q4

To help you, A1 isn the cell where you have the names to lookup
Sheet2!A1:A9 will represent the Q1, where the names are in column A
Sheet2!B1:B9 is the column where you have the amounts to be summarized

2nd part of the formula the same steps now but Sheet3 represents Q2

"KJ" wrote:

I gave range names to each of the data sets Q1, Q2, ....

On the summary tab, my formula is: vlookup(unit # cell, Q1, 4- column with
the first subtotal I need,false)+vlookup(unit # cell, Q2, 4,
false)+vlookup(unit # cell, Q3, 4, false)+vlookup(unit # cell, Q4, 4, false)

Obviously if this unit # was added in quarter 3, it will return an error.
Hope this helps.

"Eduardo" wrote:

Hi,
Could you please post your formula, thanks

"KJ" wrote:

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,276
Default vlookup question

oops I press post too soon

the difference with sumproduct is that will look for the value and will add
if it find it, if not it will not give you the #N/A error

"KJ" wrote:

I gave range names to each of the data sets Q1, Q2, ....

On the summary tab, my formula is: vlookup(unit # cell, Q1, 4- column with
the first subtotal I need,false)+vlookup(unit # cell, Q2, 4,
false)+vlookup(unit # cell, Q3, 4, false)+vlookup(unit # cell, Q4, 4, false)

Obviously if this unit # was added in quarter 3, it will return an error.
Hope this helps.

"Eduardo" wrote:

Hi,
Could you please post your formula, thanks

"KJ" wrote:

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?



  #6   Report Post  
Posted to microsoft.public.excel.misc
KJ KJ is offline
external usenet poster
 
Posts: 43
Default vlookup question

Thanks! I'll give it a shot.

"Eduardo" wrote:

Hi,
try

=SUMPRODUCT(--(A1=Sheet2!A1:A9),Sheet2!B1:B9)+SUMPRODUCT(--(A1=Sheet3!A1:A9),Sheet3!B1:B9)

Change the above formula to fit your needs you will have to add to more + in
order to get Q3 and Q4

To help you, A1 isn the cell where you have the names to lookup
Sheet2!A1:A9 will represent the Q1, where the names are in column A
Sheet2!B1:B9 is the column where you have the amounts to be summarized

2nd part of the formula the same steps now but Sheet3 represents Q2

"KJ" wrote:

I gave range names to each of the data sets Q1, Q2, ....

On the summary tab, my formula is: vlookup(unit # cell, Q1, 4- column with
the first subtotal I need,false)+vlookup(unit # cell, Q2, 4,
false)+vlookup(unit # cell, Q3, 4, false)+vlookup(unit # cell, Q4, 4, false)

Obviously if this unit # was added in quarter 3, it will return an error.
Hope this helps.

"Eduardo" wrote:

Hi,
Could you please post your formula, thanks

"KJ" wrote:

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default vlookup question

Hi KJ
I know you said you're wanting to use vlookup, but have you considered using
DataConsolidate? It works pretty well for pulling it all together if your
worksheets are set up the same-even if you have vehicles on some pages but
not on others.

Have a great weekend...
--
OneFineDay


"KJ" wrote:

I have 4 tabs (a tab for each quarter of 2008) with car IDs and how many
gallons of gas, $ amounts, etc. each one has used. The total amount of car
IDs changes from quarter to quarter, i.e. adding cars to the fleet and
retiring some. I am trying to total up the 4 quarters into a summary tab. I
am trying to use the vlookup function to add up all 4 quarters for each car
ID. I have to use the "false" argument because I need exact dollar amounts.
The problem is, if a car is not in the list for all 4 quarters, it returns an
error because it can't find it in some of the quarters. I hope this makes
some sense. It's a little hard to explain. Any ideas?

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 question DKinPgh Excel Worksheet Functions 3 November 7th 08 12:33 AM
Vlookup question ingleg Excel Discussion (Misc queries) 3 March 31st 06 03:56 PM
VLOOKUP question Watercolor artist Excel Worksheet Functions 1 June 13th 05 08:15 PM
Vlookup question nycguy96 Excel Discussion (Misc queries) 2 April 21st 05 04:06 PM
vlookup question please Bob Newman Excel Worksheet Functions 1 March 17th 05 06:25 AM


All times are GMT +1. The time now is 09:09 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"