# Formula giving me fits.....

#### GMFTM

##### New Member
Days:=IIF(ISBLANK[VEH_IDENT_NBR],"",CHOOSE(MIN(6,MAX(1,INT([GM_DAYS-1]/15))),"30 and Under","31-45","46-60","61-75","76-90","91+"))

So I am referencing a few columns here, and to me it looks right but I keep getting an error. Any help is appreciated as I am late shooting a report out..

Last edited:

### Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
In words, what are you trying to do?

I have a column with values that range from 0 - +91. I am grouping them for purposes of a pivot table. that is hte "30 and Under", "31-45"...etc.

I had the formula in excel and it worked fine, when I put in in access I am having the issues. I figured it would be transparent...

I don't have to check for the VEH_IDENT_NBR, but it is a good checksum for me.

Your table is called "GM-DAYS-1" or are you subtracting 1 from GM-DAYS ?

Try baseing something on this:

=IF(ISBLANK[VEH_IDENT_NBR],"",LOOKUP(INT([GM_DAYS-1]),{0,31,46,61,76,91},{"30 and Under","31-45","46-60","61-75","76-90","91+"})
)

GM_DAYS is the column, in excel I did -1 to get it to work. So I assume it would be like this:

=IF(ISBLANK[VEH_IDENT_NBR],"",LOOKUP(INT([GM_DAYS]),{0,31,46,61,76,91},{"30 and Under","31-45","46-60","61-75","76-90","91+"})
)

However when I try that, it gives me an error. "The expression you entered contains invalid syntax" "You may have entered an operand without an operator"

Your table is called "GM-DAYS-1" or are you subtracting 1 from GM-DAYS ?

Try baseing something on this:

=IF(ISBLANK[VEH_IDENT_NBR],"",LOOKUP(INT([GM_DAYS-1]),{0,31,46,61,76,91},{"30 and Under","31-45","46-60","61-75","76-90","91+"})
)

try the Excel forum
this is the Access forum

Replies
4
Views
1K
Replies
7
Views
328
Replies
42
Views
4K
Replies
5
Views
500
Replies
3
Views
255

1,196,498
Messages
6,015,556
Members
441,900
Latest member
Inaschemitex2023

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back