Hi,
I'm an Excel 2010 user. Last time I tried to code "Fortran" was being taught but, a lot of it has come back to me.
Simplified: through vb code I've created a form with cbobox1 for column header selection (Jan, Feb, etc.) and cbobox2 for row header (wk1, wk 2, etc.). Done.
The form also captures values for calculation etc and this is done.
Need held with a function call or something that does the following:
If cbobox1 = Mar And Cbobox2 = Wk4
desire intersect string "F66" be returned, not the location D5 of F66.
Then, I basically want Range("F66").select or turn that returned string into the activecell for data entry for other completed calculations.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]Wk 1[/TD]
[TD]F20[/TD]
[TD]F21[/TD]
[TD]F22[/TD]
[TD]F23[/TD]
[/TR]
[TR]
[TD]Wk 2[/TD]
[TD]G20[/TD]
[TD]G21[/TD]
[TD]G22[/TD]
[TD]G23[/TD]
[/TR]
[TR]
[TD]Wk 3[/TD]
[TD]H21[/TD]
[TD]H22[/TD]
[TD]H23[/TD]
[TD]H24[/TD]
[/TR]
[TR]
[TD]Wk 4[/TD]
[TD]F64[/TD]
[TD]F65[/TD]
[TD]F66[/TD]
[TD]F67[/TD]
[/TR]
</tbody>[/TABLE]
I've completed the task using 144 lines of If Then, Else If statements but I know the code can be reduced to 1/10th of this. I'm not being lazy, I've tried a dozen variants of Intersect and Union Match functionality but no luck. My problem is probably a combination of setting the proper Dim of the variables, Calling of the Function, and Return of the function answer.
Please help.
I'm an Excel 2010 user. Last time I tried to code "Fortran" was being taught but, a lot of it has come back to me.
Simplified: through vb code I've created a form with cbobox1 for column header selection (Jan, Feb, etc.) and cbobox2 for row header (wk1, wk 2, etc.). Done.
The form also captures values for calculation etc and this is done.
Need held with a function call or something that does the following:
If cbobox1 = Mar And Cbobox2 = Wk4
desire intersect string "F66" be returned, not the location D5 of F66.
Then, I basically want Range("F66").select or turn that returned string into the activecell for data entry for other completed calculations.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]Jan[/TD]
[TD]Feb[/TD]
[TD]Mar[/TD]
[TD]Apr[/TD]
[/TR]
[TR]
[TD]Wk 1[/TD]
[TD]F20[/TD]
[TD]F21[/TD]
[TD]F22[/TD]
[TD]F23[/TD]
[/TR]
[TR]
[TD]Wk 2[/TD]
[TD]G20[/TD]
[TD]G21[/TD]
[TD]G22[/TD]
[TD]G23[/TD]
[/TR]
[TR]
[TD]Wk 3[/TD]
[TD]H21[/TD]
[TD]H22[/TD]
[TD]H23[/TD]
[TD]H24[/TD]
[/TR]
[TR]
[TD]Wk 4[/TD]
[TD]F64[/TD]
[TD]F65[/TD]
[TD]F66[/TD]
[TD]F67[/TD]
[/TR]
</tbody>[/TABLE]
I've completed the task using 144 lines of If Then, Else If statements but I know the code can be reduced to 1/10th of this. I'm not being lazy, I've tried a dozen variants of Intersect and Union Match functionality but no luck. My problem is probably a combination of setting the proper Dim of the variables, Calling of the Function, and Return of the function answer.
Please help.