Showing posts with label Using. Show all posts
Showing posts with label Using. Show all posts

Wednesday, 12 September 2012

Replacing Unwanted Characters In Excel Data Using VBA

If you've ever been given an Excel spreadsheet file to analyze or extract information from you'll know how frustrating it can be if the data is not in a consistent format. Unfortunately this is a common occurrence, especially if the data has been entered by different staff members over a period of time.
This article will show you how to remove unwanted characters from Excel worksheets with just a few lines of VBA code.
Examples Of Inconsistent Format
Types of unwanted characters include abbreviations, bracketing of cities and states; and also phone numbers containing non-numeric characters. The following represent examples of inconsistent formats which might create problems later on.


07-526-2025
(021) 5262065
AZ
NY
(New York)
04 526 2065
021-526-2065.
Arizona.

The problem with using different formats is that you never know what the data may be used for in the future. Perhaps a dialling function on a customer management program might be relying on phone numbers that are in a pure numerical format. Or someone might be doing a search for customers in "Arizona" but the search won't be looking for "AZ".
Without instruction, some data entry staff tend to enter information in what they see as a user-friendly format. Each staff member might have a different view on the best data format but computers think differently from human beings and need information in a predictable format.
Using VBA To Clean Up Your Data
We're going to write a short routine to clean a list of phone numbers - removing unwanted characters and making the data searchable and computer-friendly. Excel has various in-built formulas to replace or substitute characters in a string, but the problem is that an entry may contain several different non-numeric characters and we want to remove them all.
Our VBA code will combine several techniques to ensure each phone number contains numeric values only.

Select the data range


Range("a1").CurrentRegion.Columns(1).Select
Loop through the selected data and

Assign the value of each cell into a temporary variable that
we'll use to find non-numeric characters
For Each c In Selection
txt = c.Text
Check each character in the entry to make sure it's numeric and

if it isn't, remove the character from the cell value
For x = 1 To Len(txt)
chkChar = Mid(txt, x, 1)
if Not IsNumeric(chkChar) Then
c.Value = Replace(c.Value, chkChar, "",)
End If
Next
Go to the next cell to check

Next
Once the phone numbers are purely numerical, your data can be a lot more useful. For example it could be imported into a database which requires numerical entries or be used as a search "key" when looking for duplicates.
Summary
You've seen how VBA can help clean up your data - although the best idea is to have solid business rules to prevent inconsistent formatting to begin with.
A good idea is to take the time to develop good processes before even beginning data entry but it's nice to know there are simple techniques available to make the best use of your business information whatever state it might be in.



Tuesday, 28 August 2012

Using Game Applications for Reaching Mobile Users Widely

New smartphones are launched every year with new features and attractions to allure a wider market. People are using smartphones to create a connection with their peer groups to interact and share their views at anytime, anywhere. However, the craze for new mobile devices among people has stiffened the competition between different mobile phones manufacturers.
The mobile devices have different attractions for different set of people. The mobile users can download the applications from the app store to improve their mobile's functionality and usability, too. Some of the common features that are found in different mobile phones are game applications, instant messaging, business applications, social networking applications, high-resolution camera and other types of applications to store, share and organize data.
In the high pace world, businesses have found an interesting way to create a connection with their target group by using mobile applications. As different applications are targeted to different set of people, the game applications are a common area of interest that binds people of all age groups. Hence, the businesses are looking out for smartphone game development services wherein they can develop interesting and engaging game applications for different age groups.
Such game application solutions are designed to work with different mobile operating systems such as Android, Blackberry, Apple, Windows and Symbian. The businesses can work on their strategy to find out the most suitable mobile operating system for reaching out a wider market.
There are different mobile game development companies that are providing cost-effective game application development solutions. The developers have experience to work on different mobile operating systems for developing quality solutions. The entrepreneurs can take their help in understanding the different game solutions that can help them to spread the word in a better way.
When they are sure, they can start working on the solution by taking assistance of mobile developers. It is usually recommended to choose a company that has experience to develop variety of game applications for smartphones. This gives an assurance to businesses that they are making a wise investment. If the solution is compatible with different mobile phones, the business can improve their presence by engaging a wider market easily.
Many businesses are developing different game solutions and are launching their applications in the apps store. Based on their respective strategies, they are making such applications available for free or at reasonable charges. If you are also planning out a similar solution, you can take help from a mobile development company that can work with you to plan out your perfect strategy.