Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-07-2017, 07:07 AM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default Formula help please

Hello:



I need help with a formula. In one sheet i have employee and their specific job code and their country location. On another sheet I have specific job code, country location and pay. How can i bring this over to my first sheet to make it employee specific.

1 sheets columns: Emp IS, Emp Name, JOb Code, Country
2nd Sheet Columns: Country, Job Code and Base Pay

I need my 1st sheet to look like:

Emp Id Emp Name Job Code Country Base Pay
123 XYZ 2415 Argentina 50,000
4812 MNO 2415 Canada 90,000


Any help would be greatly appreciated. Thank you
KDP
Reply With Quote
  #2  
Old 12-07-2017, 08:47 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Formula help please Windows 7 64bit Formula help please Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

You can use VLOOKUP or an INDEX/MATCH using the Job Code ( if it is unique)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 12-07-2017, 09:58 AM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
You can use VLOOKUP or an INDEX/MATCH using the Job Code ( if it is unique)
Hi I have almost 50 countries in other sheet... so this would require me to plug in V-lookup those many times. Is there any other way using two criteria. Thank you
Reply With Quote
  #4  
Old 12-07-2017, 10:26 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Formula help please Windows 7 64bit Formula help please Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

Please post a sample sheet with some data and expected results ( click Go advanced - Manage attachments)
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #5  
Old 12-07-2017, 02:12 PM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default

Quote:
Originally Posted by Pecoflyer View Post
Please post a sample sheet with some data and expected results ( click Go advanced - Manage attachments)
Thank you so much for helping,please see the attached excel sheet
Attached Files
File Type: xlsx excel Question.xlsx (13.6 KB, 10 views)
Reply With Quote
  #6  
Old 12-08-2017, 12:14 AM
ArviLaanemets ArviLaanemets is offline Formula help please Windows 8 Formula help please Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Use SUMIFS()

Like
Code:
 
=SUMIFS(TheRangeOfBasePayOnSheet2, TheRangeOfCountryOnSheet2, CountryInRowOnSheet1, TheRangeOfJobCodeOnSheet2, JobCodeInRowOnSheet1)
Reply With Quote
  #7  
Old 12-08-2017, 02:46 AM
xor xor is offline Formula help please Windows 10 Formula help please Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

To, me there seems to be more problems here.

In Sheet1!E2 you write:

Need to Bring information here from Sheet 2. if you are in job 2554 and Argentina that bring in Column D values in here

The only Job Code 2554 in Sheet2 is in row 36, country PORTUGAL.

Another problem is that all country names in Sheet2 have a space after the last letter which the country names in Sheet1 do not have. This problem can be solved of course, but I think you should give examples (at least 5) in Sheet1 column E of expected results.
Reply With Quote
  #8  
Old 12-08-2017, 04:08 AM
ArviLaanemets ArviLaanemets is offline Formula help please Windows 8 Formula help please Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

Here is SUMIFS() used on your data.

I defined both dataranges as tables - so all formulas will expand automatically when a new row is added;
I removed spaces from column headers;
On both sheets, I formatted JobCode/Code column as text, as you have some codes as texts;
In country column on 2nd sheet I removed all trailing spaces;
To get at last some test values returned, I changed a couple of job codes on 1st page so, that they have a matching entryes in table on 2nd sheet;
I did rename sheets.
Attached Files
File Type: xlsx ExcelQuestion.xlsx (15.4 KB, 11 views)
Reply With Quote
  #9  
Old 12-08-2017, 06:21 AM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default

Quote:
Originally Posted by xor View Post
To, me there seems to be more problems here.

In Sheet1!E2 you write:

Need to Bring information here from Sheet 2. if you are in job 2554 and Argentina that bring in Column D values in here

The only Job Code 2554 in Sheet2 is in row 36, country PORTUGAL.

Another problem is that all country names in Sheet2 have a space after the last letter which the country names in Sheet1 do not have. This problem can be solved of course, but I think you should give examples (at least 5) in Sheet1 column E of expected results.
Hi,
yes so two things... as my file was big could not send everything. second, it could be a possibility that if you in specific code and there is no data for that country in second sheet. The data is i am referring her is Base Salary market data and not employee data. I hope this explains. Thank you
Reply With Quote
  #10  
Old 12-08-2017, 06:35 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Formula help please Windows 7 64bit Formula help please Office 2010 64bit
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,920
Pecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond reputePecoflyer has a reputation beyond repute
Default

@KDP
Please do not quote entire posts unnecessarily. They make the thread hard to read and longer then necessary.
Thx
__________________
Using O365 v2503 - Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #11  
Old 12-08-2017, 07:53 AM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default

@ArviLaanemets's :I am looking at your excel sheet formula. I am assuming I need to set up criteria for all countries.Right?
@Pecoflyer : Got it... new here so will take care. Thank you
Reply With Quote
  #12  
Old 12-08-2017, 08:36 AM
ArviLaanemets ArviLaanemets is offline Formula help please Windows 8 Formula help please Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

When there is no match, the formula returns an empty cell, i.e. no base pay is registered for this job in this country.
Reply With Quote
  #13  
Old 12-08-2017, 12:46 PM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default

@ArviLaanemets
I am not sure what i am doing incorrectly. but it keeps giving me error. could it be because my actual file sheet 2 has 47 countries and 13,000 rows of data.
Reply With Quote
  #14  
Old 12-08-2017, 02:44 PM
ArviLaanemets ArviLaanemets is offline Formula help please Windows 8 Formula help please Office 2016
Expert
 
Join Date: May 2017
Posts: 932
ArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant futureArviLaanemets has a brilliant future
Default

What error?

Usually SUMIFS() returns 0 when at least 1 condition is not fulfilled (empty string in my formula, as I included the check for 0's). Possible causes for error I can think of are:
Different lengths of ranges used in SUMIFS() formula (in case you use good old references instead of table syntax);
Wrong names of columns or tables, when you use table syntax.

Trailing space in almost all country names on 2nd sheet would result in empty strings for all such countries returned;

I'm not sure about possibility that job codes are numbers on one sheet, and text on other. In your example file this was not the case - I changed the format only, because some entries were certainly texts.

To convert all job codes to text (do it on both sheets when yo decide for it):
Format the Job Code column as text;
Ino some free column enter the formula
Code:
="" & ReferencetoJobCodeCell
;
Copy the formula up/down, so that every Job Code will be converted;
Copy converted values, and overwrite original job codes with converted ones, using PasteSpecial > Values;
Clear/delete the column where you converted job codes.

For Excel, 1234 and '1234' are different values, and simple formatting is not enough. Until you edit the cell, it preserves old format despite the format you set.
Reply With Quote
  #15  
Old 12-11-2017, 01:07 PM
KDP KDP is offline Formula help please Windows 10 Formula help please Office 2016
Novice
Formula help please
 
Join Date: Nov 2017
Posts: 13
KDP is on a distinguished road
Default

Hi
@ArviLaanemets I am looking in to it now. I greatly appreciate your help. Thank you
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF(OR - IF(AND // Formula Help Pixie Excel 2 09-06-2017 11:12 PM
Formula help please Possible to use an existing vlookup formula to also insert correct info and trigger a SUM formula innkeeper9 Excel 2 09-13-2016 08:59 PM
Formula help please if(and.. formula paxon Excel 8 05-19-2016 08:05 AM
Need help with dragging a formula and changing a reference column as I drag the formula. LupeB Excel 1 10-22-2015 03:02 PM
Formula help please Formula Help odonnest Excel Programming 8 01-23-2015 07:18 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:09 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft