0
1
I work with ranged data and want to populate a cell that includes values at set increments between the min and maximum. For example, the minimum outer diameter is 1 1/16" and the maximum outer diameter is 1 11/32". I want to populate a third cell that includes each end plus all the values in between by the 32th of an inch: 1 1/16";1 3/32";1 1/8";1 5/32";1 3/16";1 7/32";1 1/4";1 9/32";1 5/16";1 11/32"
Can I do this in Excel 2007?
So far, I'm just copying and pasting from a master, semi-colon delimited list I have of all values in-between 1 1/64th and 2" and then going back and copying and replacing "1 " with "2 " and adding them to the string and so on.
I just tried Madball73's VBA code. I was able to get it to generate values iff the whole number value was the same for each limit and I removed the ". For example, I tried 1 1/64 to 1 1/4 (and changed the increment to 0.015625 since this one was to the 64th). The VBA code returned: ";1 1/64";1 1/32";1 3/64";1 1/16";1 5/64";1 3/32";1 7/64";1 1/8";1 9/64";1 5/32";1 11/64";1 3/16";1 13/64";1 7/32";1 15/64";1 1/4"
Getting closer!
Update: Okay, with quite a bit of tweaking and adding the ultimate " through concatenation and trimming the preceding ";, I'm able to get this to work.
Update 2: it doesn't seem to be working any more :(
It's certainly not a trivial problem. I kind of doubt anyone will come up with a worksheet function solution, but this can be done in VBA with some effort. Are you open to a VBA solution? – Excellll – 2014-04-10T17:52:49.500
Yes - I do this often enough and on large enough databases that I could certainly do it. – Elizabeth VO – 2014-04-10T18:28:41.193
Do you have a maximum number of values you would be dealing with? i.e. can one assume that you'll never have more than a 1 inch gap? (32 values)? – Madball73 – 2014-04-10T18:57:40.890
Unfortunately not and it is variable. Sometimes the ranges are 2-7" – Elizabeth VO – 2014-04-10T19:07:47.563
Have you tried anything yet? If so, please [edit] your question to include it. – CharlieRB – 2014-04-10T19:48:15.103