I am trying to create a document comprising two pages at the moment. The front page has three items which change by personal selection (using switch boxes). One is a number, between 8 and 160 (in 8's). Two is a colour reference (red, blue, green). Three is a quantity 100 - 1000 (in 100's). Page two of the document comprises a grid, The first column comprises the numbers 8 - 160 (in 8's ) vertically down. The first horizontal row comprises the numbers 100 - 1000 (in 100's). The colour reference RED is just the name I have given to the second sheet. (I hope to have three sheets with different names eventually).
What I need is the code to make this work.
The front page makes reference to the cells which change and the name a have called this function "PrintText".
The code "=PrintText(L16,L18,L23)" is in cell M41 where I want the answer to appear.
The code I have presently is as follows: [b](I have tried many options, the closest I have come to a result is a reference to the cell "FourB2" not actually the number in that cell!).
CODE
Function PrintText(Extent, Quantity, Text_C As Variant) As Variant
If Extent = "8" And Quantity = "100" And Text_C = "4" Then PrintText = "Four!B2"
ElseIf Extent = "16" And Quantity = "100" And Text_C = "'4" Then PrintText = "Four!B3"
ElseIf Extent = "24" And Quantity = "100" And Text_C = "'4" Then PrintText = "Four!B4"
ElseIf Extent = "32" And Quantity = "100" And Text_C = "'4" Then PrintText = "Four!B5"
End If
End Function
Any help would be very much appreciated.
thanks,
Compo