I'm using this formula to generate a random code:
=RANDBETWEEN(0,9)&CHAR(RANDBETWEEN(65,9))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(33,47))&RANDBETWEEN(0,9)&CHAR(RANDBETWEEN(65,9))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(33,47))
Instead of something that looks like this:6Ib&4Rj/, I get
NAME? error
Anybody can see where I'm missing something?
RANDBETWEEN requires the first argument to be less than the second argument.
Replace all instances of RANDBETWEEN(65,9) with RANDBETWEEN(9,65) and that should fix your problem.
Related
I'm trying to create a Parallel Coordinate graph with a csv file I have. The graph I'm trying to make looks like the image I have drawn here -> DrawnGraph. The issue I am having is that the countries are listed individually on the csv file. I need to create a code that places the countries within their corresponding continents. I attempted the code below but I keep getting "The operator || is undefined for the argument type(s) boolean, String"
I realize that I am typing it wrong but I do not know how to fix it. Help please
if(Country.equals("Aruba")||Country.equals("Argentina")||Country.equals("Bolivia")||Country.equals("Brazil")||Country.equals("Chile")||("Columbia")||Country.equals("Ecuador")||Country.equals("Guyana")||Country.equals("Paraguay")||Country.equals("Peru")||Country.equals("Suriname")||Country.equals("Uruguay")||Country.equals("Venezuela"))
Looks like you're missing an occurrence of Country.equals here:
Country.equals("Chile")||("Columbia")||Country.equals("Ecuador")
Add that in and it ought to work.
By the way, you haven't specified what programming language you're using. You probably should.
I want to remove all the characters from a string expect whatever character is between a certain set of characters. So for example I have the input of Grade:2/2014-2015 and I want the output of just the grade, 2.
I'm thinking that I need to use the FIND function to grab whatever is between the : and the / , this also needs to work with double characters such 10 however I believe that it would work so long as the defining values with the FIND function are correct.
Unfortunately I am totally lost on this when using the FIND function however if there is another function that would work better I could probably figure it out myself if I knew what function.
It's not particularly elegant but =MID(A1,FIND(":",A1)+1,FIND("/",A1) - FIND(":",A1) - 1) would work.
MID takes start and length,FIND returns the index of a given character.
Edit:
As pointed out, "Grade:" is fixed length so the following would work just as well:
=MID(A1,7,FIND("/",A1) - 7)
You could use LEFT() to remove "Grade:"
And then use and then use LEFTB() to remove the year.
Look at this link here. This is the way I would go about it.
=SUBSTITUTE(SUBSTITUTE(C4, "Grade:", ""), "/2014-2015", "")
where C4 is the name of your cell.
Consider the following statement:
process.text.readLines[3..<-1]
It seems like it should work. Essentially, strip off the first two elements of the array. However, the range operator is confused by the ending -1, since its less than -1. You can easily solve this problem by storing the array as a variable and replacing -1 with size() but that requires an extra line and the definition of a variable. Any other ideas how to express this easily?
I believe you could do:
process.text.readLines()[ 2..-1 ]
or:
process.text.readLines().drop( 2 )
This will also do the trick:
process.text.readLines().with { it[2..size()-1] }
It's longer than simply calling drop as suggested above, but it might read a little better depending on the larger context. with lets you get around defining a new variable.
While building a project , I am seeing an error message like
:ReadFromStream' : function does not take 4 arguments
Can you please suggest me what could be the error.
Below is the line , it is showing the error exits:
hr = var.ReadFromStream(pStm, pMap[i].vt, pMap[i].rgclsidAllowed, pMap[i].cclsidAllowed);
I would appreciate any help .Thanks in advance.
Check the definition of the function, usually this occurs when you are missing a parameter (or have one too many)
If it is supposed to take four of them, make sure one of your parameters isn't the wrong type for the overload you are attempting to use. Sometimes that can make it think you are trying to use a different overload that doesn't use that number.
:ReadFromStream' : function does not
take 4 arguments Can you please
suggest me what could be the error.
That means that ReadFromStream doesn't take 4 arguments.
That means you can't pass 4 objects into it.
(pStm, pMap[i].vt, pMap[i].rgclsidAllowed, pMap[i].cclsidAllowed)
pStm
Map[i].vt
pMap[i].rgclsidAllowed
pMap[i].cclsidAllowed
I think in the definition of ReadFromStream, the method does not have 4 parameters as arguments. Please revisit that.
Related bug on Microsoft Connect
I am using the code inXML scehma to represent my phone number which is like this:
ABC-JHG
I am getting an error like: values Abc-JHG is not allowed for element Name.
How should I make it comaptile with my input.
\d is only for numbers, change the second two to \w.
Use a regular expression that allows non-numeric data.