Eurekaonide
Active Member
- Joined
- Feb 1, 2010
- Messages
- 433
Ok I wonder if you gurus can help me (again!) Please.
I have one workbook in v 2007 two tabs, one is "Data_Import" the other is "Data-Output"
On Data-Import I have headers in the top row;
Ref, Name, Gate1, Gate2, Gate3 etc
1234, test, 01/05/2014, 01/06/2014,01/07/2014 etc
5678,test2, 02/05/2014, 05/07/2014,01/08/2014 etc
on the date-Output tab I have headers in the top row;
ref, Name, (dates in each column from 01/01/2014 - 31/12/2014)
I have a VLookup formula currently in the name column looking up from the manually input ref, referring back to the Data_inport tab.
What I then want to do is in each corresponding cell along each row in the Data_output tab to look at the date for that column in say C1 and look to see if this date matches the date in the correct row within the Data_inport tab for that ref in Gate1, Gate2, Gate3 etc and then put a "s" if a match is found.
I can currently do this fine by using the below formula;
=IF(OR(C$1=Data_import!$K49,C$1=Data_import!$L49,C$1=Data_import!$M49,C$1=Data_import!$N49,C$1=Data_import!$O49,C$1=Data_import!$P49,C$1=Data_import!$Q49,C$1=Data_import!$R49,C$1=Data_import!$S49,C$1=Data_import!$T49,C$1=Data_import!$U49,C$1=Data_import!$V49,C$1=Data_import!$W49,C$1=Data_import!$X49,C$1=Data_import!$Y49,C$1=Data_import!$Z49,),"s","")
However, what I would like to do is;
1) Place this into a VBA code so its quicker and easier to run
2) Depending on which column in the Data-Import tab returns a positive match I want to change the font colour of the "s" in the Data_Output tab.
I was thinking of doing it via a Case scenario but do not seem to be able to get it to lookup all the different values across the different pages.
I guess in summary its;
Data_Output cell C2 = does the ref in A2 match a ref in data_Import tab column A - Yes then does the date in the Data_Output tab C1 match a date in Data_Import Column C (Row ref=same row as matched "Ref") - yes colour the font red (in the dataOutput tab) next cell along - if No - does it match the date in Column D in Data_Import tab - no does it match date in column E etc etc.
Your help is much appreciated.
I have one workbook in v 2007 two tabs, one is "Data_Import" the other is "Data-Output"
On Data-Import I have headers in the top row;
Ref, Name, Gate1, Gate2, Gate3 etc
1234, test, 01/05/2014, 01/06/2014,01/07/2014 etc
5678,test2, 02/05/2014, 05/07/2014,01/08/2014 etc
on the date-Output tab I have headers in the top row;
ref, Name, (dates in each column from 01/01/2014 - 31/12/2014)
I have a VLookup formula currently in the name column looking up from the manually input ref, referring back to the Data_inport tab.
What I then want to do is in each corresponding cell along each row in the Data_output tab to look at the date for that column in say C1 and look to see if this date matches the date in the correct row within the Data_inport tab for that ref in Gate1, Gate2, Gate3 etc and then put a "s" if a match is found.
I can currently do this fine by using the below formula;
=IF(OR(C$1=Data_import!$K49,C$1=Data_import!$L49,C$1=Data_import!$M49,C$1=Data_import!$N49,C$1=Data_import!$O49,C$1=Data_import!$P49,C$1=Data_import!$Q49,C$1=Data_import!$R49,C$1=Data_import!$S49,C$1=Data_import!$T49,C$1=Data_import!$U49,C$1=Data_import!$V49,C$1=Data_import!$W49,C$1=Data_import!$X49,C$1=Data_import!$Y49,C$1=Data_import!$Z49,),"s","")
However, what I would like to do is;
1) Place this into a VBA code so its quicker and easier to run
2) Depending on which column in the Data-Import tab returns a positive match I want to change the font colour of the "s" in the Data_Output tab.
I was thinking of doing it via a Case scenario but do not seem to be able to get it to lookup all the different values across the different pages.
I guess in summary its;
Data_Output cell C2 = does the ref in A2 match a ref in data_Import tab column A - Yes then does the date in the Data_Output tab C1 match a date in Data_Import Column C (Row ref=same row as matched "Ref") - yes colour the font red (in the dataOutput tab) next cell along - if No - does it match the date in Column D in Data_Import tab - no does it match date in column E etc etc.
Your help is much appreciated.