Skip to main content
improved formatting and requirements
Source Link
Hannah Vernon
  • 70.5k
  • 22
  • 177
  • 321

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.

I'd like to have this population logic built in an Access database

I have the "mapping" table in Column Start, End, Bucket), then have the values in (My Values) column. I can populate the bucket for (My values) column in excel easily via vlookup, but want to be able to do the same via Access.

The Only solution i can think of is a loft of IIF () function, but that's messy and not classy.

Cheers for your help in advance.

All the Best, Granady

EDIT: 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 values           Bucket (populated via vlookup)
0.00    0.08    1           7.416438356         22
0.08    0.16    2           7.416438356         22
0.16    0.25    3           7.416438356         22
0.25    0.33    4           7.416438356         22
0.33    0.41    5           0.252054795         4
0.41    0.49    6           0.750684932         10
0.49    0.58    7           0.504109589         7
0.58    0.66    8           0.504109589         7
0.66    0.74    9           0.504109589         7
0.74    0.82    10          9.690410959         22
0.82    0.90    11          0.504109589         7
0.90    0.99    12          0.504109589         7
0.99    1.23    13          0.706849315         9
1.23    1.48    14          0.504109589         7
1.48    1.73    15          1.504109589         15
1.73    1.97    16          0.567123288         7
1.97    2.22    17          0.504109589         7
2.22    2.47    18          0.753424658         10
2.47    2.71    19          85.56164384         24
2.71    2.96    20          1.482191781         15
2.96    5.00    21          2.994520548         21
5.00    10.00   22          3.594520548         21
10.00   25.00   23          99                  24
25.00   101.00  24          0.504109589         7

I'd like the following population logic built in an Access database:

I have two tables. The first, Table1 contains a set of buckets, with a starting and ending value:

Start   End   Bucket        
0.00    0.08    1            
0.08    0.16    2           
0.16    0.25    3           
0.25    0.33    4           
0.33    0.41    5           
0.41    0.49    6           
0.49    0.58    7           
0.58    0.66    8           
0.66    0.74    9            
0.74    0.82    10          
0.82    0.90    11          
0.90    0.99    12           
0.99    1.23    13          
1.23    1.48    14          
1.48    1.73    15          
1.73    1.97    16          
1.97    2.22    17          
2.22    2.47    18          
2.47    2.71    19          
2.71    2.96    20          
2.96    5.00    21          
5.00    10.00   22          
10.00   25.00   23          
25.00   101.00  24          

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           Bucket 
7.416438356         22
7.416438356         22
7.416438356         22
7.416438356         22
0.252054795         4
0.750684932         10
0.504109589         7
0.504109589         7
0.504109589         7
9.690410959         22
0.504109589         7
0.504109589         7
0.706849315         9
0.504109589         7
1.504109589         15
0.567123288         7
0.504109589         7
0.753424658         10
85.56164384         24
1.482191781         15
2.994520548         21
3.594520548         21
99                  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.

added 186 characters in body
Source Link
granady
  • 11
  • 1
  • 3

EDIT: 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.

EDIT: 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.

Source Link
granady
  • 11
  • 1
  • 3

Access Value between ranges

I'd like to have this population logic built in an Access database

I have the "mapping" table in Column Start, End, Bucket), then have the values in (My Values) column. I can populate the bucket for (My values) column in excel easily via vlookup, but want to be able to do the same via Access.

The Only solution i can think of is a loft of IIF () function, but that's messy and not classy.

Cheers for your help in advance.

All the Best, Granady

Start   End   Bucket        My values           Bucket (populated via vlookup)
0.00    0.08    1           7.416438356         22
0.08    0.16    2           7.416438356         22
0.16    0.25    3           7.416438356         22
0.25    0.33    4           7.416438356         22
0.33    0.41    5           0.252054795         4
0.41    0.49    6           0.750684932         10
0.49    0.58    7           0.504109589         7
0.58    0.66    8           0.504109589         7
0.66    0.74    9           0.504109589         7
0.74    0.82    10          9.690410959         22
0.82    0.90    11          0.504109589         7
0.90    0.99    12          0.504109589         7
0.99    1.23    13          0.706849315         9
1.23    1.48    14          0.504109589         7
1.48    1.73    15          1.504109589         15
1.73    1.97    16          0.567123288         7
1.97    2.22    17          0.504109589         7
2.22    2.47    18          0.753424658         10
2.47    2.71    19          85.56164384         24
2.71    2.96    20          1.482191781         15
2.96    5.00    21          2.994520548         21
5.00    10.00   22          3.594520548         21
10.00   25.00   23          99                  24
25.00   101.00  24          0.504109589         7