Look if value from sheet 1 exist in sheet 2 and if yes copy a specific cell from sheet 2 in sheet 1

sandero1970

New Member
Joined
Aug 23, 2013
Messages
19
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I have a file with several sheets. One of them is the parameters sheet containg a table with values from P1 to S100.
In my second sheet "decisions" I have to look if the RANGE("F"& i) of the sheet Decisions is in the table from sheet Parameters (see if the value is in the table)
and IF YES then copy the value from cell S from the line where the cell from column Q sheet PAram is the same as value in columns E of sheet decisions
if NOT the next line from sheet Decisions

A bit difficult to explain but hope that with pictures it is ok.
Thx
 

Attachments

  • REq1.jpg
    REq1.jpg
    58.7 KB · Views: 4
  • Req2.jpg
    Req2.jpg
    48.5 KB · Views: 4

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.
I solved it like that. May be a nother way exists:
Dim l As Integer
Dim i As Integer
Dim cel As Range
Sheets("decisions").Activate

l = Sheets("decisions").Cells(Rows.Count, 1).End(xlUp).Row 'Last Row

For i = 2 To l
If Range("E" & i) = "050/31/XX" Then
Cells(i, "E").ClearContents
End If
Next


l = Sheets("decisions").Cells(Rows.Count, 1).End(xlUp).Row 'Last Row

For Each cel In Range("E2:E" & l)
If cel.Value = "" Then cel.Formula = "=VLOOKUP(RC[1],'Audit BSM'!C[5]:C[7],3,FALSE)"
Next cel
 
Upvote 0

Forum statistics

Threads
1,214,804
Messages
6,121,652
Members
449,045
Latest member
Marcus05

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