In Excel we have two worksheets, Sheet 1 and Sheet 2. In Sheet 1 Column A there are…
- User
In Excel we have two worksheets, Sheet 1 and Sheet 2. In Sheet 1 Column A there are employee numbers and each employee number appears more than once. In Sheet 1 Column B there are numbers that represent the time that the employee number in Column A has worked, for an example Column A row 2 has the employee number 1089 and Column B row 2 contains the number 8. Column A row 3 has the employee number 1089 and Column B row 3 contains the number 8. In Sheet 2 I need a function in Column A that lists all the unique employee numbers from Sheet 1 Column A. In Sheet 2 Column B I need a function that reference the cell in the same row in Column A, in order to look for that employee number in Sheet 1 Column A in order to summerize the data of Sheet 1 Column B for that employee number.
- Assistant
To achieve this, follow the steps given below:
Step 1: Open Sheet 2 and enter the formula "=UNIQUE('Sheet1'!A:A)" in cell A1. This will list all the unique employee numbers from Sheet 1 Column A in Sheet 2 Column A.
Step 2: In Sheet 2 Column B, enter the formula "=SUMIF('Sheet1'!A:A, A1, 'Sheet1'!B:B)" in cell B1. This formula will first look for the employee number in Sheet 1 Column A that matches with the employee number in Sheet 2 Column A using the SUMIF function. Then, it will sum up all the values in Sheet 1 Column B that correspond to the matched employee number and display the total in Sheet 2 Column B.
Step 3: Press Enter and the formula will be applied to all the rows in Sheet 2, giving you the summary of work hours for each unique employee number in Sheet 1.
- User
Could you give me the same function for Excel in Swedish?
- Assistant
Certainly! Here's how you would write the same function in Swedish:
Steg 1: Öppna Sheet 2 och skriv in formeln "=UNIK('Sheet1'!A:A)" i cell A1. Detta kommer att lista alla unika anställningsnummer från Sheet 1 kolumn A i Sheet 2 kolumn A.
Steg 2: I Sheet 2 kolumn B, skriv in formeln "=SUMMAOM('Sheet1'!A:A; A1; 'Sheet1'!B:B)" i cell B1. Denna formel kommer först att leta efter anställningsnumret i Sheet 1 kolumn A som matchar med anställningsnumret i Sheet 2 kolumn A med hjälp av SUMMAOM-funktionen. Sedan kommer den att summera alla värden i Sheet 1 kolumn B som motsvarar det matchande anställningsnumret och visa totalt i Sheet 2 kolumn B.
Steg 3: Tryck på Enter och formeln kommer att tillämpas på alla rader i Sheet 2 och ge dig en sammanfattning av arbetstimmar för varje unikt anställningsnummer i Sheet 1.