unknownymous

Board Regular
Joined
Sep 19, 2017
Messages
249
Office Version
  1. 2016
Platform
  1. Windows
Hi Guys,

I'm trying to create a macro but having a hard time creating as I'm more on recording and there are some conditions that needs to be met.

I have an excel file with 3 tabs:

Sheet 1: Master Tab

IDName
001
000
005

<tbody>
</tbody>

Sheet 2&3: Source 1 & 2 (Format is the same but the data is different - see below sample)

IDNameScoreNote
001Jack88Student
002Sheena85Student
004May70Teacher
003John0Student
005Sam0Student

<tbody>
</tbody>


Task:
1. I need to look up both Sheet 2 & 3 against Sheet 1 by using ID column as ref.
2. If the cell is not in the lookup range and the score is zero, it will be put under the "ZERO" section.
3. If the cell is not in the lookup range and there is a score, then the row will be highlighted and another sheet will be created name "Add" (should be added in the Master tab) which contains the ID, Name & Source Tab Sheet Name (see below).
4. If the Note Column is "Teacher", either there score there is a score on none, it will be put under the "EXCLUDED" section
5. See below Final Result

IDNameScoreNoteLookUp Result
001Jack88Student001
005Sam0Student005
002Sheena85Student
ZERO
003John0Student
EXCLUDE
004May70Teacher

<tbody>
</tbody>

"Add" Tab

IDNameSource Tab
002SheenaSource 2

<tbody>
</tbody>

Will appreciate any help you could give.


Thank you! :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,214,929
Messages
6,122,315
Members
449,081
Latest member
tanurai

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