The Idea Dude
Well-known Member
- Joined
- Aug 15, 2002
- Messages
- 591
- Office Version
- 2016
- Platform
- Windows
Hi all,
I am looking for some code that I can't figure out...this is what I have and require:
I have a sheet called "Load Config". On the sheet there is 4 cells of importance. E2, M2, P7 and R7
I have another sheet called "Performance Data". This is where it gets a little bit tricky
I have 4 'tables' set up on this sheet (Performance Data).
A3:O13 is one table (table 1)
A17:O27 is another table (table 2)
Q3:AE13 is another table (table 3)
Q17:AE27 is another table (table 4)
I require code that will look at the correct table and then go to the correct row and column of that table and then copy the value in that cell to Range("D31") on the Performance Data sheet.
This is how it will work: (mix of code and normal language )
If sheets("Load Config").range("E2")="no" then either table 1 or table 3 will be used depending on other criteria.
If sheets("Load Config").range("E2")<>"no" then either table 2 or table 4 will be used depending on other criteria.
If sheets("Load Config").range("M2")<> 1 then use table 1 or 2 depending on other previous criteria, else use table 3 or 4 depending on previous criteria.
NOW WE KNOW WHICH TABLE TO LOOK AT
P7 of Sheets("Load Config") is the value we are looking for in the first row of the table.
R7 of Sheets("Load Config") is the value we are looking for in the first column of the table.
the value of the cell at the intersection of the resultant row and column is the value that should be copied and pasted to Range("D31") on the Performance Data sheet.
I hope that all makes some sense and I appreciate peoples effort to help me with this.
Thank You
I am looking for some code that I can't figure out...this is what I have and require:
I have a sheet called "Load Config". On the sheet there is 4 cells of importance. E2, M2, P7 and R7
I have another sheet called "Performance Data". This is where it gets a little bit tricky
I have 4 'tables' set up on this sheet (Performance Data).
A3:O13 is one table (table 1)
A17:O27 is another table (table 2)
Q3:AE13 is another table (table 3)
Q17:AE27 is another table (table 4)
I require code that will look at the correct table and then go to the correct row and column of that table and then copy the value in that cell to Range("D31") on the Performance Data sheet.
This is how it will work: (mix of code and normal language )
If sheets("Load Config").range("E2")="no" then either table 1 or table 3 will be used depending on other criteria.
If sheets("Load Config").range("E2")<>"no" then either table 2 or table 4 will be used depending on other criteria.
If sheets("Load Config").range("M2")<> 1 then use table 1 or 2 depending on other previous criteria, else use table 3 or 4 depending on previous criteria.
NOW WE KNOW WHICH TABLE TO LOOK AT
P7 of Sheets("Load Config") is the value we are looking for in the first row of the table.
R7 of Sheets("Load Config") is the value we are looking for in the first column of the table.
the value of the cell at the intersection of the resultant row and column is the value that should be copied and pasted to Range("D31") on the Performance Data sheet.
I hope that all makes some sense and I appreciate peoples effort to help me with this.
Thank You