Find all matches in workbook and offset the results into another sheet (VBA)

Status
Not open for further replies.

sarao18592

New Member
Joined
Mar 4, 2021
Messages
12
Office Version
  1. 2019
  2. 2016
Platform
  1. MacOS
Hi everyone,
I'd like some help if possible!
I currently have a workbook with 4 sheets(the number of sheets will change) and one more sheet called Results.

I would like to look for the string: "Employee Code:-" in Column B, and get the value in Column S and Column K and paste it in Results A and B respectively. (Moving to the next find if Column S and Column K have the same value)

I would then like to copy a range of values below where Employee Code is found. 3 and 4 rows below and from Column C to Column AM. Copying this into Result Column C.
Then leaving a line after the results have been pasted and repeating for the rest of the find values.

E.g. if Employee code is found in B17, I would like the value of S17 in Result(A4) and K17 in result(B4) if S17.value <> K17.value. Furthermore, C20:AM21 in Result(C4:AM5).

Then when the next employee code is found, the result is pasted in Row 7.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Status
Not open for further replies.

Forum statistics

Threads
1,214,837
Messages
6,121,883
Members
449,057
Latest member
Moo4247

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