I'd like to have thisthe following population logic built in an Access database:
I have the "mapping" table in Column Start, End, Bucket), then have the values in (My Values) columntwo tables. I can populate the bucket for (My values) column in excel easily via vlookup The first, but want to be able to do the same via Access.
The Only solution i can think of isTable1
contains a loftset of IIF () functionbuckets, but that's messywith a starting and not classy.
Cheers for your help in advance.
All the Best, Granady
EDITending value: These are two seperate tables. Start/End/Bucket is Table1 and Table2 is where i have "My values", and where i would want the Bucket to be populated based on Table1 values.
Start End Bucket My
0.00 values 0.08 1 Bucket (populated via vlookup)
0.00
0.08 1 0.16 2 7.416438356 22
0.0816 0.1625 23 7
0.41643835625 0.33 4 22
0.16 0.25 3
0.33 0.41 5 7.416438356 22
0.2541 0.3349 46 7
0.41643835649 0.58 7 22
0.33 0.41 5
0.58 0.66 8 0.252054795 4
0.4166 0.4974 69
0.750684932 74 0.82 10
0.49 0.58 7
0.82 0.90 11 0.504109589 7
0.5890 0.6699 8 12
0.504109589 99 1.23 7
0.6613 0.74 9
1.23 1.48 14 0.504109589 7
01.7448 01.8273 1015 9
1.69041095973 1.97 16 22
0.82 0.90 11
1.97 2.22 17 0.504109589 7
02.9022 02.9947 1218 0
2.50410958947 2.71 19 7
0.99 1.23 13
2.71 2.96 20 0.706849315 9
12.2396 15.4800 1421 0
5.504109589 00 10.00 7
1.48 22 1.73 15
10.00 25.00 23 1.504109589 15
125.73 00 1101.9700 24 16
Table2
contains values that I need assigned to a bucket by matching the My Values
column to lie between the Start
and End
range in Table1
:
Table2
where Bucket
has been populated with the corresponding Bucket
value from Table1
:
My values 0.567123288 Bucket 7
17.97416438356 2.22 17 22
7.416438356 022
7.504109589416438356 722
27.22416438356 2.47 18 22
0.252054795 4
0.753424658750684932 10
20.47504109589 2.71 19 7
0.504109589 857
0.56164384504109589 247
29.71690410959 2.96 20 22
0.504109589 17
0.482191781504109589 157
20.96706849315 5.00 21 9
0.504109589 27
1.994520548504109589 2115
50.00567123288 10.00 22 7
0.504109589 3 7
0.594520548753424658 21
10
85.0056164384 25.00 23 24
1.482191781 9915
2.994520548 21
3.594520548 2421
25.0099 101.00 24 24
0.504109589 7
I can populate Bucket
for My values
column in Excel easily via the VLookup
function, but want to be able to do the same using Microsoft Access.
The only solution I can think of is a lot of IIF()
functions, but that's messy and not classy.