Antiquation
Antiquation

Reputation: 13

Excel formula using Concatenate has too few arguments

I've got a formula which works great while referencing a single cell in Google Spreadsheets. When I carry it over to Excel, however, there are apparently not enough arguments ("you've entered too few arguments").

I've dug up all the info on Spreadsheets I can, but none of the functions appear to be foreign to Excel and I don't see any missing arguments, which means the formatting might be off somehow but after playing around with it I can't seem to find resolution.

Formula:

=Concatenate(if(A24<10,1,ROUNDDOWN((A24-1)/4-1)),if(OR(A24<10,(mod(A24-1,4)-1) <0),"d","d+"),ROUNDDOWN(if(A24<10,-(10-A24+2)/2,mod((A24-1),4)-1)))

Here's the section that gets highlighted after the error (the "1" between the asterisks):

=Concatenate(if(A24<10,1,ROUNDDOWN((A24-1)/4-**1**)),if(OR(A24<10,(mod(A24-1,4)-1) <0),"d","d+"),ROUNDDOWN(if(A24<10,-(10-A24+2)/2,mod((A24-1),4)-1)))

The purpose of this is to convert a static number in a single cell (i.e. 10) into a value in dice plus pips (i.e. 1d, 2d+2, etc.). This has no relation to statistics; the formula is built with its own scaling for a specific purpose.

Thanks for your help and the learning experience!

Upvotes: 1

Views: 263

Answers (1)

Ed Nelson
Ed Nelson

Reputation: 10259

In Excel use:

=CONCATENATE(IF(A24<10,1,ROUNDDOWN((A24-1)/4-1,0)),IF(OR(A24<10,(MOD(A24-1,4)-1) <0),"d","d+"),ROUNDDOWN(IF(A24<10,-(10-A24+2)/2,MOD((A24-1),4)-1),0))

ROUNDDOWN in Excel requires two arguments. number and places. Note the ',0' added after each of the ROUNDDOWNs. In Google places is optional. If not entered '0' is assumed.

Upvotes: 1

Related Questions