Text only Data Validation - excel

I know there was a similar question asked but I couldn't manipulate that code. What I need is Data validation that will make sure the user ONLY enters 2 characters and both of them have to be text. I keep running into trouble because the system allows when I type w1. Any help would be greatly appreciated
Data Validation only 2 characters long and both characters must be text

Don't know whether it is the best way, but try it:
=AND(LEN(A1)=2,LOWER(LEFT(A1,1))>="a",LOWER(LEFT(A1,1))<="z",LOWER(RIGHT(A1,1))>="a",RIGHT(LEFT(A1,1))<="z")

Related

Refresh all but input pwd once

I have an excel file with roughli 25 oracle connections that I have to refresh. Each one prompts a usn and password input. I would like a vba that prompts for a usn and password once and inputs it in all following prompts.
I have been searching for a way to do this but can not find a suitable solution.
Thank you all in advance.
"First of all I would like to know if this is even possible."
In short, yes It all comes down to the connection string. How you go about creating and using that string is up to your requirements and your imagination.
"I have been searching for a way to do this but can not find a suitable solution."
Anecdotal evidence suggests a person suffering from this condition failed to do one it more of the following:
ask the right question
recognize the right answer
to have patience or persistence
overcome laziness
access Google
But seriously, I don't know what to tell you, the answer is in comments of the the second link I gave you, Specifically, the third and fourth comment. The third points vaguely toward the connection string and the forth takes you to more helpful commentary.
Refresh a connection in Excel to SQL Server (with password) using VBA
Can I use VBA to "pass" a password to an external database connection in Excel?

I am building a spelling game in visual studio, but I don't know how to check the users input with my pre-coded 'database' of words

I am currently building a spelling game in Visual Studio Express 2012 and I need help. I have already coded all the words that are going to be there, and a random number generator. The number generator will be invisible in the final product but basically every number corresponds to a word. The code is something like this:
Dim r as New Random r.next(1,21)
If lblRandomNumber.text="1" then txtRandomWord.text="Adduct"
I have coded for 20 words, using the same code. My problem now is that I don't know how to check the users input with the predefined words, and that is what I'm asking for your help with. I know my code will work because when I inserted a new textbox, used the same code
(if lblRandomNumber.text="1" then txtUserInput.text= "adduct"), and then said coded "if txtUserInput.text=txtRandomWord.text Then msgbox.text("well done").
After clicking the word generate button a few times (to get the number 1) a message box finally came up and said "well done".
My question is, how would I return the users input to the computer and have the computer check that input with the other words in my "database" of words.
I know it is not a database of words but I don't know what else to call it.
Not all of my code is precisely right here as I don't currently have access to my program. If you could help me out I would be very thankful,
Oisin.

Using the "extends" functionality in drools spreadsheets?

I have a question about using a certian drools functionality in drools decision spreadsheet, that would help a lot in reducing the files and making them more readable.
I can't add more than two links so please downlad this .zip file that includes:
Version1.PNG, Version1.drl, Version2.PNG, Version2.drl, Version3desired.drl
http://s000.tinyupload.com/?file_id=89653236807266194978
So here is the sample rule that we are using right now (something similar)Version1.PNG
And this when converted to a drl gives us the following 193 line long drl file. (Version1.drl)
It is ok and it works well, but after some research we found out we could use the "extends" functionality in drl.
And it works in a drl, what I would like to know is how would I use it in an Excel spreadsheet?
I designed the rule in this way: Version2.PNG
Clearly this is not how "extends" should be used in Excel, since this returns the following drl (Version2.drl)
You can see the extends is inside the "" of the rule name. Makes sense I guess, what I woudl like to know however is, how would I use it correctly? a seperate column? That didn't work, at least not the way I did it.
Does anyone know how It should be done?
The correct DRL that should be made after the Excel is converted is this: (Version3desired.drl)
Thank you for any help :)
Cheers!
There is no gain in using extends with spreadsheets in the way you describe it in your question.
I suggest that you stick to the spreadsheet layout shown in Version1.png. If data entry personnel complains about the dull repetition of 1/7/30 in oodles of rows, teach them how to join cells so they need to type each value only once.

I can't understand what XlSaveAsAccessMode is, can someone explain it?

I need to know how this enumeration works, but consulting the documentation was not very helpful. I know it's a parameter for saving an Excel workbook and I know it goes from 1-3.
This doesn't help me understand the difference however and I can't seem to find any resources that do so. I would be very grateful if anyone can explain to me what this is used for?
XlSaveAsAccessMode Enumeration (Excel) has:
Name Value Description
xlExclusive 3 Exclusive mode
xlNoChange 1 Default (does not change the access mode)
xlShared 2 Share list
I think basically just a control over whether another instance/application may or may not write to the file during its save operation.

Best non-interactive approach to enter a string into a formular field and get the resulting text

In some website for which I have access, there are some input fields. In the sixth field I need to enter some input string from a list of 10000 strings, then a new page appears, for which I would just need to count the number of lines. Finally I would like to get a table with two columns like input string and number of resulting lines. Since I have to manually enter the info for all the different 10000 strings, I wonder therefore what is the best approach to enter a string into a generic formular field and get the resulting text. I heard about curl but I am not sure whether this is the easiest one.
P.S.
Example of interactive way: I type some string o words into google search and then I get a new page with the search results. Previously I have introduced my google username and password, so the results will be probably filtered according to my profile.
Example of non-interactive way: A script somehow introduces my user information, search query and saves to some text file the search results. Imagine the same idea but for a more complicated website like this.
What you want to do is to send a HTTP POST with specific data. This can be done with any proper HTTP client code, and one such is libcurl (or the pycurl binding or even using the curl command line tool). On the response from the post, you probably get a redirect and then the results, or you need to do a separate request for the results and then you're done and go back to do the next POST. Repeat until all POSTs are done.
What you may need to take into account is that you may have to deal with cookies and possibly to follow a redirect from the POST. A good approach is to record a "manual session" as done with a browser (use firebug or LiveHTTPHeaders etc) and then use that recording to help you repeat the same thing with a HTTP client.
A decent tutorial to get some starting up details on this kind of work can be found here: http://curl.haxx.se/docs/httpscripting.html
You could also use JMeter to run all the posts. You may use the CSV input to set the 10000 strings. Then you save the result as xml and extract the necessary data.

Resources