Vishesh's blog

Answer to Forum question
Submitted by Vishesh on 30 April, 2012 - 05:08Refer attached Excel file for answer to forum question on
http://excelexperts.com/creating-2nd-list-dependent-1st-list
See data validation criteria conditions on Cell A2 and B2. Also see Named ranges created (dynamic named ranges can also be used here)
- 1 comment
- 294 reads

Task Management Utility
Submitted by Vishesh on 31 March, 2012 - 11:24Here is small Task Management Utility with facility to view Reports. Give it a try and give your feedback and suggestions.

- Add new comment
- 426 reads

UK Tax Calculator (Simple & Comprehensive)
Submitted by Vishesh on 31 March, 2012 - 10:33Download the attached UK Tax Calculator Excel file having simple and comprehensive tax calculator.
Simple Tax Calculator:

Comprehensive Tax Calculator:

- Add new comment
- 477 reads

Leave System
Submitted by Vishesh on 17 March, 2012 - 19:42This is a small Leave system utility. Download the attached zip file and extract excel and access file from it. This can be used in a multi user environment as well by keeping the access database at a commonly accessible location and distributing the excel file to all users. In the access database there is a table 'M_LeaveTypes' from where you can maintain the Leave Type and Max Carry over for each type of leave. In this system an user is identified by his Windows login id.

Multiple Choice (Questionnaire/Survey) generator
Submitted by Vishesh on 13 March, 2012 - 16:13Here is an utility to generate a simple multi choice questionnaire/survey (as you wish to use it). The survey response files can be collated using the collate responses button and selecting the created files

- Add new comment
- 879 reads

Small Shop Utility (for mid-sized shops)
Submitted by Vishesh on 12 March, 2012 - 16:56This is a small utility to speed up the process of buying and selling between a Shopkeeper and a Customer. There are two sections (excel files) of it - Shopkeeper and Customer.
The Shopkeeper file as shown below remains with the shopkeeper where he can add/delete/modify items (Click Manage Items) and prices in the stock.
The Update Customer copy button allows you to choose the other customer copy provided to be updated with the updated items and prices. This updated customer copy is then emailed/sent to the customer.
- 9 comments
- Read more
- 551 reads

Sorting on Custom Sort Order (VBA)
Submitted by Vishesh on 1 March, 2012 - 17:57Following piece of code sort the data based on custom sort order. You can provide your own sort order in a separate table. For illustration, download the attached file.

Sub TestCustomSort()
Dim rngSortOrder As Range
Dim rngSortValues As Range
Dim arrSortOrder
- Add new comment
- Read more
- 717 reads

Sort on 'n' no. of Fields (VBA)
Submitted by Vishesh on 25 February, 2012 - 08:50Copy-Paste the following code in a general module and run. Alternatively, download the attached file to see how it works. You can pass field names (Column headers) or Column Index as function parameters.
Sub TestIt()
Call CustomSort(Sheet1.UsedRange, True, "F1", "F4")
'or
'Call CustomSort(Sheet1.UsedRange, True, 1, 4)
End Sub
- Add new comment
- Read more
- 489 reads

Filter records using arrays (VBA)
Submitted by Vishesh on 20 February, 2012 - 10:16Put the following code in a general module and run. You can download the attachment as well to see how it works.
Sub TestIt()
Dim rngTgt As Range
Dim arr
'Target where you want to see filtered data
Set rngTgt = Sheet1.Range("J2")
rngTgt.CurrentRegion.Offset(1).ClearContents
'Calling function with parameters
- 2 comments
- Read more
- 824 reads

Cell Content Change History in Comments
Submitted by Vishesh on 7 February, 2012 - 07:59This will record any cell change in the cell comment. There is a constant at the beginning of the code module; you can set the number of records in comments (history) to be maintained. Specifying 0 means no record limit. This applies to the whole workbook.
Const gc_intMaxCmtHistory As Integer = 5 'Max Comments History allowed 'Change it to 0 to allow n no.
- Add new comment
- Read more
- 464 reads

Simple Multiple Source Pivot
Submitted by Vishesh on 30 January, 2012 - 19:10Follow these steps to create a pivot table from multiple sources (same of other file). See attached example file.
Steps :
1a In Excel 2003 open the PivotTable and PivotChart wizard by choosing Data -> PivotTable and PivotChart Report.
1b In Excel 2007, press Alt+DP, then type P to open the wizard as there is no equivalent menu option.
2 Choose Multiple Consolidation ranges
3 Open file B as well
4 Choose relevant page field option
5 Simply select and add the ranges (highlighted cells) from this and other file. You can choose to have as many files (A+B)
6 Select New Sheet & Finish
- Add new comment
- 373 reads

Answer to Blog
Submitted by Vishesh on 15 January, 2012 - 15:02This is the solution to blog on url
http://excelexperts.com/help
Please see attached xl file.
- 4 comments
- 466 reads

Export to and Import from Tab delimited Text file
Submitted by Vishesh on 5 January, 2012 - 14:55- Add new comment
- Read more
- 779 reads

Text/Number Validation in Text Boxes
Submitted by Vishesh on 11 December, 2011 - 17:19- Add new comment
- Read more
- 602 reads

Solution-Copy data range to new worksheet
Submitted by Vishesh on 8 November, 2011 - 18:14Solution for problem posted on url
http://excelexperts.com/copy-range-data-new-worksheet-when-matching-data...
Please see attached sheet. Click on the button provided on the sheet.
- Add new comment
- 950 reads

Customised Progress Bar
Submitted by Vishesh on 29 October, 2011 - 18:23Download the attached Excel workbook to see how the customised progress bar works. To implement this in your project simply copy the form (frmProgress) and general module (modProgressBar). And then, you just need to call ShowProgress procedure like this
Call ShowProgress("Task 4", 10)

- Add new comment
- 675 reads

VBA code to handle Access Imports and Query
Submitted by Vishesh on 21 October, 2011 - 11:22Public g_objConnection As ADODB.Connection Public Const gc_strDBPath As String = "C:\Test.mdb" Function blnConnectDatabase(strPath As String, strDBPass As String) As Boolean ' If blnFileExists(strPath) = False Then ' GoTo ErrH ' Exit Function ' End If Set g_objConnection = New ADODB.Connection On Error GoTo ErrH g_objConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ strPath & ";Jet OLEDB:Database Password=" & strDBPass & ";" On Error GoTo 0 blnConnectDatabas

Solution to Forum Ques
Submitted by Vishesh on 17 September, 2011 - 07:59Solution for Forum Ques on url:
- Add new comment
- 1324 reads

Rows to column solved
Submitted by Vishesh on 15 September, 2011 - 18:02Solution for problem asked in url: http://excelexperts.com/moving-data-rows-columns-depending-unique-conten...
Pls c attached sheet. I have tried to solve it using formula only (no macros as it would need more involvement).
- Add new comment
- 694 reads

Filter/Find in Array
Submitted by Vishesh on 7 August, 2011 - 07:51- Add new comment
- Read more
- 1167 reads

Count Array Dimensions
Submitted by Vishesh on 6 August, 2011 - 19:31- Add new comment
- Read more
- 846 reads

Create In-Cell Chart in Excel using VBA
Submitted by Vishesh on 5 August, 2011 - 08:26Paste the following code in a general module and pass the required parameters to create an chart in a cell. This code however works with Excel 2007 onwards.

- Add new comment
- Read more
- 1474 reads

Transpose Back
Submitted by Vishesh on 3 August, 2011 - 09:00Paste the following code in any module and run the Test procedure
Sub Test() Call TransposeBack(Sheet1.Range("A3:D10"), Sheet1.Range("I1")) End Sub Sub TransposeBack(rngData As Range, rngTarget As Range) Dim rngHeader As Range Dim rngId As Range Dim rngCell As Range Dim rngDest As Range Dim lngRept As Long Set rngDest = rngTarget.Offset(1) With rngData Set rngHeader = Intersect(.Rows(1), .Rows(1).O

Code generated ComboBox (ActiveX)
Submitted by Vishesh on 1 August, 2011 - 07:11- Add new comment
- Read more
- 953 reads

Web Query Solution
Submitted by Vishesh on 29 July, 2011 - 21:23Solution for problem posted on url:
http://excelexperts.com/automating-pulling-data-website
Please use the attached xl sheet. Change the symbol and click the button to see
- Add new comment
- 991 reads

Copy Picture from Web to Excel
Submitted by Vishesh on 19 July, 2011 - 16:50- 9 comments
- Read more
- 1513 reads

Array to speed up (Range vs Array)
Submitted by Vishesh on 11 July, 2011 - 16:57- Add new comment
- Read more
- 1263 reads

Using Array to refer to multiple sheets
Submitted by Vishesh on 10 July, 2011 - 18:41Sub DeleteMultipleSheets() Application.DisplayAlerts = False With ThisWorkbook.Worksheets(Array("Sheet2", "Sheet3")) .Delete End With Application.DisplayAlerts = True End Sub
- Add new comment
- 852 reads

Abbreviated Month name
Submitted by Vishesh on 10 July, 2011 - 18:18DO NOT take first 3 characters from a month name to get an abbreviated month name. This can give you duplicate results in some languages as first 3 characters of two months may be same.
I have encountered this with the Czech language.
So, use the following:
If the month is 1 i.e. January
So, to get abbreviated month name ALWAYS use
Monthname(1, True)
This will always return standard abbreviated month name.
- Add new comment
- 822 reads

Deleting all charts & shapes on a sheet
Submitted by Vishesh on 9 July, 2011 - 21:07sub DeleteAllCharts() Sheet1.ChartObjects.delete End Sub
sub DeleteAllShapes() Sheet1.Shapes.SelectAll Selection.Delete End Sub
- Add new comment
- 862 reads

Recent comments
3 hours 20 min ago
10 hours 10 min ago
9 hours 26 min ago
12 hours 29 min ago
22 hours 49 min ago
1 day 2 hours ago
1 day 2 hours ago
1 day 8 hours ago
1 day 9 hours ago
2 days 17 min ago