IF and VLOOKUP Help

JSO

New Member
Joined
Dec 5, 2019
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I am trying to parse out a time-sheet that contains a value in a cell that needs to be placed in one of two columns depending on the code in the prior column.
The codes are in column "I" and the values are in column "J". I would like to build a sheet that adds two additional columns that would allow me to add the value to the appropriate column. If column "I" contains any one of any of the following codes; REIMB, SAL, VAC then i need the value of cell "J2" to be placed in this cell.
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Welcome to the MrExcel board!

Is this (copied down) what you mean? If not, more details & examples please.

Book1
IJK
2REIMBData 1Data 1
3ABCData 2 
4VACData 3Data 3
5 
6XYZData 5 
7SALData 6Data 6
To column
Cell Formulas
RangeFormula
K2:K7K2=IF(OR(I2={"REIMB","SAL","VAC"}),J2,"")
 
Upvote 0
The first shot is the source page and the second is the desired second page. I need to have formulas fro the destination page for the Amount and Hours columns that reads the code in column I on the source page to return the value. Everything but REG should populate the Amount column in the second page and the REG code should populate the Hours column.

Source Page.png
Destination Page.png
 
Upvote 0
Enter the below in J2 and copy down.

=IF(I2="REG",,H2)

Enter the below in K2 and copy down.
=IF(I2="REG",H2,)
 
Upvote 0
I also need the other columns to return the value based on the additional criteria, VAC, PERD, BON, PRO, ADJ etc....
 
Upvote 0
So, none of these solutions are working.

Column I can contain any one of 7 variables, all text. Depending on that label, the data in column J needs to be dropped into one of two columns on the second worksheet with the other column returning either a zero or nothing at all.
 
Upvote 0
IFS is working for multiple variables, but is not returning just the search criteria linked data.
 
Upvote 0
From my reading of post 3, snjpverma's suggestion in post 4 does just what you asked apart from referencing the appropriate cell on the source sheet. I have also adjusted to show nothing ("") rather than 0 for the irrelevant cells.

BTW, if you want to see the results with your own sample data, you need to give it to us in a form that we can copy/paste to test with, otherwise too much typing is required. ;)
See my signature block below for help with that.

Book1
IJ
1TypeHrs or Amt
2ABC10
3VAC20
4REG30
5XYZ52
6SAL12
7REG45
8PERD12
Source


Book1
IJK
1TypeAmountHours
2ABC10 
3VAC20 
4REG 30
5XYZ52 
6SAL12 
7REG 45
8PERD12 
Destination
Cell Formulas
RangeFormula
J2:J8J2=IF(I2="REG","",Source!J2)
K2:K8K2=IF(I2="REG",Source!J2,"")
 
Upvote 0

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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