Newbies [email protected] Posted August 23, 2005 Newbies Posted August 23, 2005 hi, I have two fields 'fld1', 'fld2'. Both fields are a popup menu and can contain one of the following the values: 0,1,2,3,4,5,6,7,8 I have a third field that needs to contain the start value, all the values in between and then the end value. ie if 'fld1'=2 and 'fld2'=6 then fld3= 2,3,4,5,6 (with or without commas) I have tried to create a series of calculations, but I am stumped. Does anyone have a solution. It could be a script if it has to be, but it would be better as a calculation if possible. Thanks
SlimJim Posted August 23, 2005 Posted August 23, 2005 Assuming you have validated that fld1 is no bigger than fld2. Then set up fld3 as an unstored calculation: MiddleWords( "0, 1, 2, 3, 4, 5, 6, 7, 8" ; Fld1+ 1; Fld2 - Fld1 + 1)
RalphL Posted August 23, 2005 Posted August 23, 2005 You need to make a Custom Function to use in this calcaulation. Make a Custom Function Range with the Parameters Start & End. The function looks like this: Case ( End > Start ; Range (Start; End - 1) & "," & End; End ) Now Define Fld3 as a text calculation = Range ( Fld1; Fld2 )
Recommended Posts
This topic is 7100 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now