Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Excel database?

This topic is 5379 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok, so I want a list of persons, like this:
|Egon |Quist|    1|
|Peter|Pan  |    2|
|Egon |Smith|    3|
|John |Brown|    4| 
Containing the first name, last name, and number (Or perhaps just row number) of some persons. Now I want to make a function so that I can write the name of a person and retrieve his number: |John|Brown| 4|<-- Like this, I write "John" and "Brown" and get "4". How would I go about this?

Share this post

Link to post
Share on other sites
Hmm, could do with more information as to what you''re trying to achieve here. Are you talking about writing that function in Excel as a formulae, or am I missing the point?

You could do this in Access (or any other database), then use SQL to query the database for the information you''re looking for. An example query might look something like:

"SELECT IDnum FROM persons WHERE Name1 = "John" AND Name2 = "Brown"

You could easily write a wrapper function to do this for you, passing Name1 and Name2 as parameters to the function. Then, depending on if a record was successfully retrieved, you could either return IDnum from the function (as an unsigned integer type, long most likely) or -1 if the record wasn''t found.


result = getID(Name1, Name2);
if (result == -1)
// Record wasn''t found.
// Record was found.

Hope that helps,


Share this post

Link to post
Share on other sites
Guest Anonymous Poster
Umm, no, it has to be straight MS Excel.
Basically I have a long list of names in an Excel document, and I want to know what row any given name is on.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!