Combining CONCAT, DATEDIF, and nested IF -getting #VALUE! error - excel

Trying to fill an investment field with Short/Long Term & Capital Gain/Loss. Ending values should be one of the following - STCG, STCL, LTCG, LTCL. (I tried to cut/paste an excel image but it's icky, sorry)
Mini Spreadsheet - Date Acquired (H62), G/L per share (J62), Position (result)
For some investments, the date acquired is Var (for various purchases) or blank (for cash). If it is "Var", the function should return "LT" and skip the DATEDIF function. If the date is blank, the function should be skipped entirely and return blank as there is neither gain nor loss.
=IF($H62="","",CONCAT(IF(OR($H62="Var", DATEDIF($H62,TODAY(),"d")<365),"ST","LT"),IF($J62<0,"CL","CG")))
My original function worked well, except when the Date Acquired field (H62) had "Var", I got a #VALUE! error. I tried to do this with nested IFs and with IFS function, but couldn't get it to work (Problem with this formula error): =IF(H61="","",CONCAT(IF($H61="Var", "LT",IF(DATEDIF($H61,TODAY(),"d")<365),"ST","LT")),IF(J61<0,"CL","CG")))
The logic should be: If date="" then "" else concat LT/ST test and CL/CG test
LT/ST test: If date="Var" then "LT" else if date days before today < 365,"ST" else "LT"
CL/CG test: If gain per share <0 "CL" else "CG" (working)
Please help! I could add a hidden column (I'd rather not) or do the whole thing with nested IFs or IFS but I'd have to repeat arguments and that's sloppy & asking for trouble.

Related

If(AND) combination produces "You've entered too many arguments for this function" error

hello everyone I'm here and needs help with excel
message from excel is
(you've entered too many arguments for this function)
and that my function.
=IF(AND(H2="A","B"),"group 1",IF(AND(N2H2="C","D"),"group 2",""))
please any one can help ?
The first condition to test within the IF statement "AND(H2="A","B")" will always return false - as this tests "Is H2 = "A" ? AND "Is '"B"'?
H2 cannot equal "A" and "B" simultaneously, and besides, even if you wanted to test that you'd have to use "AND(H2="A", H2="B").
Imagine someone asking you the Q "Is H2 = "A"?"
You could answer this if you knew what was in cell H2 (like Excel does) - and you could answer 'True' (yes) or 'False' (no).
But if you were asked is "B" as well? you would probably be quite puzzled - perhaps you would reply "Is "B" what as well"?
Excel would also be puzzled and in such circumstances the default response is 'False' (until proven otherwise!)
The 2nd AND statement is the wrong syntax - see here for some examples of how to use the AND statement.
This is probably why you are seeing the error you see - again:
If someone asked you "Is N2H2="C" and is "B" as well?
You wouldn't know which cell I was referring to (N2H2 does not exist in Excel)
Further, you wouldn't know what to say to "Is "B"?" (Is it a consonent? Is it capital? Is it the 2nd letter of the alphabet? Is it what?
Using this equation Excel will not return an error "too many arguments", it will return "invalid name error" (because there is no such thing as "N2H2" as far as Excel is concerned")
You need to use the following generic syntax for AND statements of this type:
AND(cell 1=some value1, cell 2= some value2) - not AND(cell1cell2=some value1, some value2)
i.e. this would be correct syntax:
=IF(AND(H2="A",N2="B"),"group 1",IF(AND(H2="D",N2="C"),"group 2",""))
(but it assumes you are trying to test cell N2 = B in the first AND statement because it's impossible for cell H2 to equal both A and B at the same time as I've said above)
As someone has pointed out in the comments - if you're testing whether H2 can be "A" OR "B" then simply use the OR statement - i.e. something like this:
=IF(OR(H2="A",H2="B"),"group 1",IF(AND(H2="D",N2="C"),"group 2",""))
https://support.microsoft.com/en-us/office/and-function-5f19b2e8-e1df-4408-897a-ce285a19e9d9

Wild card is not working for extracting status in excel

Below is my table, I want to extract status starting with "QATs" but the formula is not working.
CRM,QATsPending
PRM,QATSInprogress
CRM,QATsOnHold
CRM,QATsCompleted,Screen
My formula is working
=IF(G2="*Pending*", "QATsPending", IF(G2="*Completed*","QATsCompleted", IF(G2="*O2InProgress*", "QATsInProgress", "QATsOnHold")))
It is giving on QATsOnHold as output.
Your ELSE (, "QATsOnHold")))) is triggered for everything as no values in your Table actually EQUAL anything you are trying to match
You are also putting the value to match and the value to return in the wrong order.
It should be Match, Return, e.g. =IF(G2="QATsPending", "Pending"... not =IF(G2="Pending", "QATsPending"
Your code:
=IF(G2="Pending", "QATsPending", IF(G2="Completed","QATsCompleted", IF(G2="O2InProgress", "QATsInProgress", "QATsOnHold")))
Should be:
=IF(G2="QATsPending", "Pending", IF(G2="QATsCompleted","Completed", IF(G2="QATsInProgress", "O2InProgress", "QATsOnHold")))
But looking at your Table.. might actually be:
=IF(G2="QATsPending PRM", "Pending", IF(G2="QATsCompleted","Completed", IF(G2="QATSInprogress CRM", "O2InProgress", "QATsOnHold")))

IF statement to determine date

I want to set an order completion date based on the words Standard or Rush.
Currently I have it set up where if a cell shows the word Standard, it will give me a date, but once I try to add Rush to that, it get errors
=IF(ISNUMBER(SEARCH("VF",B2)), IF(J2="Standard", WORKDAY(TODAY( )+2,1)), "")
I also tried this, but when I type Rush into J2, the result shows as just FALSE
=IF(ISNUMBER(SEARCH("VF",B2)), (IF(J2="Standard", WORKDAY(TODAY( )+2,1))), (IF(J2="Rush", WORKDAY(TODAY( )+1,1))))
The idea here is to make an order wanted date based on the Rush and Standard time frame.
You have embedded your new IF function inside of the wrong if.
This: (IF(J2="Standard", WORKDAY(TODAY( )+2,1))) is going to return a date or FALSE. You want to change that FALSE to return your next IF statement. Instead:
=IF(ISNUMBER(SEARCH("VF",B2)), IF(J2="Standard", WORKDAY(TODAY( )+2,1), IF(J2="Rush", WORKDAY(TODAY( )+1,1))), "")
You return nothing "" in the case that your ISNUMBER() fails still.

Excel IF(AND) Statements

I have set up a betting worksheet with filters for date start / end, bet type, tipper, sports, leagues and variable.
The issue have that when I come create a formula referencing all of these filters, I get the "You've entered too many arguments in this function." error.
Before adding the Leagues filter, I started off with just date start / end, bet type, tipper, sports and variable filters and I had this formula which was working fine:
=IF(H12<>"",
IF(AND(FILT_D=1,FILT_T=1,FILT_B=1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P"),
IF(AND(FILT_D>1,FILT_T=1,FILT_B=1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B=1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B>1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B=1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B=1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B>1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B=1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B>1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B=1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B>1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B>1,FILT_C=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B>1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B>1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B=1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B>1,FILT_C>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
"")))))))))))))))),
"")
I then added a league filter into the mix and got the error. This is the amended formula containing the league filter (FILT_T).
=IF(P12<>"",
IF(AND(FILT_D=1,FILT_T=1,FILT_B=1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P"),
IF(AND(FILT_D>1,FILT_T=1,FILT_B=1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B=1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B>1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B=1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B=1,FILT_C=1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B=1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B>1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B=1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B=1,FILT_C=1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B>1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B=1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B=1,FILT_C=1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B>1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B>1,FILT_C=1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_TYPE,OFFSET(AW$10,FILT_B,0),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B>1,FILT_C=1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0)),
IF(AND(FILT_D=1,FILT_T>1,FILT_B>1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D=1,FILT_T=1,FILT_B>1,FILT_C>1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B>1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T=1,FILT_B>1,FILT_C>1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B=1,FILT_C>1,FILT_L=1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),CUSTOM,OFFSET(AY$10,FILT_C,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B=1,FILT_C>1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),CUSTOM,OFFSET(AY$10,FILT_C,0),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
IF(AND(FILT_D>1,FILT_T>1,FILT_B>1,FILT_C>1,FILT_L>1),SUMIFS(AT_RISK,SPORT,H12,WIN,"<>P",BET_DATE,">="&DATE(OFFSET(BA$11,FILT_YS,0),FILT_MS,FILT_DS),BET_DATE,"<="&DATE(OFFSET(BA$11,FILT_YE,0),FILT_ME,FILT_DE),CAPPER,OFFSET(AX$10,FILT_T,0),BET_TYPE,OFFSET(AW$10,FILT_B,0),CUSTOM,OFFSET(AY$10,FILT_C,0),LEAGUES,OFFSET(AZ$10,FILT_L,0)),
"")))))))))))))))))))))),
"")
Can anyone shed light on what I'm doing wrong?
You can only have a maximum of 255 cell referenced or indeed numbers referred to in a formula. The following has 255 ones and it works fine, adding an additional one will give you the error
=IF(AND(1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1);"t";"f")

WorksheetFunction.value() missing in Excel

In a spreadsheet formula, =VALUE("$100") will evaluate to the numeric value of 100. I then tried to access this function in VBA via WorksheetFunction object, however it is missing.
In VBA I tried the conversion function Val("$100"), however that returns 0. So how can I accomplish this via VBA?
Val() only really works if the string is all numbers I'm afraid - currency signs cause it a problem.
If you're always going to have the same currency sign in the string, it might be worth using something like
StringName = replace(StringName, "$", "")
to take out the $ by replacing it with "" - otherwise if your strings aren't always going to be this predictable the below question might help:
How to find numbers from a string?
see https://learn.microsoft.com/en-us/office/vba/api/excel.worksheetfunction.numbervalue
example of using above, which will return a value of -1234.56:
MsgBox WorksheetFunction.NumberValue("-$1,234.56", ".", ",")
Note that if the result is non-numeric, it throws an error. For example (swapping the comma grouping and decimal character params which is invalid in this case):
MsgBox WorksheetFunction.NumberValue("-$1,234.56", ".", ",")
I don't understand why the above link doesn't have any version info. It is currently dated 2019‎-‎05‎-‎23 - no idea if that's because it is new or if it was recently updated.

Resources