Not sure what formula to use

catecumper

New Member
Joined
Feb 20, 2019
Messages
2
Hi all,

Long time user, 1st time poster :)

I have about 700 lines of salary to move into three separate columns (C3, C4, C5) on the right, some of the employee numbers are in the column A more than once, depending on the different rates of pay they get and to do this manually is painful. There must be a formula to say that if employee number 101 (A3) has a salary (B3), then add B3 to column C3 or C4 or C5 depending on which department they work in. I have a separate table with what employee numbers are in each dept, and have tried Vlookup and IF, but when i copy the formula down it doesn't work


emp nosalaryDept1Dept2Det3
10110001000
10210001000
10310001000
10410001000
101300300
1025050

<tbody>
</tbody>


all help gratefully received.
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Hi, welcome to the board.

I think I understand what you want to do but your request is a bit vague.

What I would do is bring the department numbers across using VLOOKUP, like this

=VLOOKUP(A3,F$1:G$100,2,false)

This assumes that . . .
Your employee numbers start in cell A3 as stated.
Your table of employee numbers and departments is in the range F1:G100, with employee numbers in column F, and department IDs in col G.
Adapt as required.

If you can get this bit working, we can then move on to allocating salary to the right department.
 
Upvote 0
Hi Gerald,

Thanks for the quick reply and your help, yes I have managed to get the formula working.

I'll try to explain it a little better,

Column A = employee number, this can be repeated down the column
Column B = their salary for the month and any additional payments maid, OT, etc
Column C = Dept 1
Column D = Dept 2
Column E = Dept 3

If employee 101 is paid £1000 for the month and works in Dept 1, I would like the formula to show £1000 in column C (Dept 1), then if they have any extra payments further down the column, then that payment will also show in the Dept 1 column.

hope that helps.
Catherine



Hi, welcome to the board.

I think I understand what you want to do but your request is a bit vague.

What I would do is bring the department numbers across using VLOOKUP, like this

=VLOOKUP(A3,F$1:G$100,2,false)

This assumes that . . .
Your employee numbers start in cell A3 as stated.
Your table of employee numbers and departments is in the range F1:G100, with employee numbers in column F, and department IDs in col G.
Adapt as required.

If you can get this bit working, we can then move on to allocating salary to the right department.
 
Upvote 0
Hi, thanks. In my opinion, it's not usually necessary to quote other people's posts in their entirety, just makes the thread longer :)

You say you've managed to get the formula working.

So which bit do you still need help with, if any ?
 
Upvote 0

Forum statistics

Threads
1,215,372
Messages
6,124,532
Members
449,169
Latest member
mm424

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