Adding to VLOOKUP

Acody

New Member
Joined
Mar 14, 2002
Messages
4
I am using the VLOOKUP Formula to add numbers together (from two different tables)only if their job number matches. If the job numbers do not match I want my cell to read the total from my second table. How can I do this?
Thanks,
Annie
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
On 2002-03-15 16:19, Acody wrote:
I am using the VLOOKUP Formula to add numbers together (from two different tables)only if their job number matches. If the job numbers do not match I want my cell to read the total from my second table. How can I do this?
Thanks,
Annie

Can you post the VLOOKUP formula that you use along with where the job numbers are to be found?

Aladin
 
Upvote 0
=SUM(K31+VLOOKUP(B31,jobnumber,10,FALSE))

1st Table: (3 Job #s)
B14:B16

2nd Table: (3 Job 3s)-only one same # as first table
B30:B32

Thanks!
 
Upvote 0
=if(b31=VLOOKUP(B31,jobnumber,1,FALSE),SUM(K31+VLOOKUP(B31,jobnumber,10,FALSE)),"Not Equal")

I think...
 
Upvote 0
On 2002-03-15 16:35, Acody wrote:
=SUM(K31+VLOOKUP(B31,jobnumber,10,FALSE))

1st Table: (3 Job #s)
B14:B16

2nd Table: (3 Job 3s)-only one same # as first table
B30:B32

Thanks!

Annie,

I'm still confused.

'jobnumber' seems to be a lookup table. What range is it? And how B14:B16 and B30:B32 are related to 'jubnumber'?

Does K31 hold a value that is computed by a VLOOKUP formula?

Aladin
 
Upvote 0
Aladin, Thanks for your continued help : )

The range for "jobnumber" is:
B9 to K9
B16 to K16
(everything in the square above).

B14:B16 are the job numbers from week one that I have on my timesheet.
B30:B32 are the job numbers from my second week, and on the second week I added one new job that I did not work on the first week.
So when I plug in my formula for the new job my cell reads N/A...b/c my formula wants to pull a number from week #1.
I want my formula to look to week one for a similiar job number, if it does not find one, then add only the hours worked on that job for week two.
K31 it a sum of the hours I worked on that job for week two. K31 is the cell I want my formula to refer to if week one does not have the same job number as week two.

Sorry that this is so confusing! : )
 
Upvote 0
On 2002-03-19 08:31, Acody wrote:
Aladin, Thanks for your continued help : )

The range for "jobnumber" is:
B9 to K9
B16 to K16
(everything in the square above).

B14:B16 are the job numbers from week one that I have on my timesheet.
B30:B32 are the job numbers from my second week, and on the second week I added one new job that I did not work on the first week.
So when I plug in my formula for the new job my cell reads N/A...b/c my formula wants to pull a number from week #1.
I want my formula to look to week one for a similiar job number, if it does not find one, then add only the hours worked on that job for week two.
K31 it a sum of the hours I worked on that job for week two. K31 is the cell I want my formula to refer to if week one does not have the same job number as week two.

Sorry that this is so confusing! : )

It's indeed hard to describe the organization of one's worksheet. I don't think I could have done better. After seeing your worksheet, I can now say what you need:

In L30 enter:

=K30+IF(COUNTIF($B$9:$B$16,B30),VLOOKUP(B30,$B$9:$K$16,10,0),0)

and copy down this as far as needed.

$B$9:$K$16 is the range which you named 'jobnumber'. I think there isn't much of a reason to use a named range here, but you want to, replace that range by its name.

Aladin
 
Upvote 0

Forum statistics

Threads
1,214,590
Messages
6,120,423
Members
448,961
Latest member
nzskater

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