Brandonfromsingapore
New Member
- Joined
- Jan 5, 2012
- Messages
- 38
Hello Forum!
May i ask for VBA codes help?
The first sheet of the workbook is where everything takes place.
The source of reference is on Worksheet two (known as Detroit) and on worksheet three (known as new york)
On Worksheet one, the headers (text) are on row 1, from column A to column L.
The content (data) goes from row 2 and down. The number of rows is a variable.
Column A is “Staff ID number” and from row 2 to down, all cells are numbers
I need a macro to on the header (row 1). Look for a header that is called “Fruit_name”
Once this column is located on row 1 (it is variable and is not fixed column but can be found between column A and column L).
Once this column is located, I need the macro to start looking down from row 2 and down and end only when the last row is completed.
The source of reference can either be from sheet two or sheet three and this is selected by the operator from the start of the macro.
Can the macro be program to ask the operator a question such as “Where should the reference sheet be?” And then allow the operator to choose either sheet two or sheet 3 as the source of reference.
Once the reference sheet is chosen, on the reference sheet, there are data/information on column A only. There are no header and the information goes from row 1 and down the rows and the number of rows is not fixed.
The cells contains name of fruits, such as A1 is “Apple” and A2 is Grapes and A3 is Strawberries (examples).
The macro is then going to look up the cell in sheet 1 against the selected sheet and if the name of the fruit is found, it is going to colour the cell blue in colour. If the name of the fruit cannot be found in the sheet 2, it is not going to do anything. It then goes to the next row below/down and repeat the same process and colours the cell blue if the name of the fruit can be found on the reference sheet.
Thank you for all your help!
May i ask for VBA codes help?
The first sheet of the workbook is where everything takes place.
The source of reference is on Worksheet two (known as Detroit) and on worksheet three (known as new york)
On Worksheet one, the headers (text) are on row 1, from column A to column L.
The content (data) goes from row 2 and down. The number of rows is a variable.
Column A is “Staff ID number” and from row 2 to down, all cells are numbers
I need a macro to on the header (row 1). Look for a header that is called “Fruit_name”
Once this column is located on row 1 (it is variable and is not fixed column but can be found between column A and column L).
Once this column is located, I need the macro to start looking down from row 2 and down and end only when the last row is completed.
The source of reference can either be from sheet two or sheet three and this is selected by the operator from the start of the macro.
Can the macro be program to ask the operator a question such as “Where should the reference sheet be?” And then allow the operator to choose either sheet two or sheet 3 as the source of reference.
Once the reference sheet is chosen, on the reference sheet, there are data/information on column A only. There are no header and the information goes from row 1 and down the rows and the number of rows is not fixed.
The cells contains name of fruits, such as A1 is “Apple” and A2 is Grapes and A3 is Strawberries (examples).
The macro is then going to look up the cell in sheet 1 against the selected sheet and if the name of the fruit is found, it is going to colour the cell blue in colour. If the name of the fruit cannot be found in the sheet 2, it is not going to do anything. It then goes to the next row below/down and repeat the same process and colours the cell blue if the name of the fruit can be found on the reference sheet.
Thank you for all your help!