Hi everyone,
I came to know that we can use command prompt in windows vista and windows 7 by installing dosbox software.
I tried in Windows XP .. Its not that much user friendly .. we need to mount the drives first then we have to use it. Please try in your system and let me know, how it worked for you.
Going to home for 10 days .. See you later .. Happy Dasara ..
October 07, 2010
September 16, 2010
Excel Visual basic Editor multi line comment and uncomment
How to do multiline comment/uncomment?
Solution:
- Open Visual Basic Editor
- Click on View->Toolbars->Customize
- Select Edit->Drag the Commands scroll bar to find the comment and uncomment icons
- Select Comment Block/Uncomment Block and drag drop in Edit(can be any) menu
- Select the multi-line code in editor and click on Comment/Uncomment menu item
Finding missing records in worksheet w.r.t other worksheet (or) intersection of two worksheets
Description:
We have two worksheets with similar records with same structure)(not in number of records). We want to know missing records in one worksheet with reference to other worksheet (Or) we want to find the intersection of both sheets.
Solution
Workbooks used are Workbook1.xls, Workbook2.xls, Results.xls
Workbook1 is having Src1 worksheet
Workbook2 is having Src2 worksheet
Results.xls is having Dest1 worksheet which will have Src1-Src2 records
Results.xls is having Dest2 worksheet which will have Src2-Src1 records
Sample Output:
Note:
Dest1 contains the missing(intersection) data, which available in Src1 but not in Src2
Dest2 contains the missing(intersection) data, which available in Src2 but not in Src1
Please let me know if any further queries, contact me psrdotcom@gmail.com
We have two worksheets with similar records with same structure)(not in number of records). We want to know missing records in one worksheet with reference to other worksheet (Or) we want to find the intersection of both sheets.
Solution
Workbooks used are Workbook1.xls, Workbook2.xls, Results.xls
Workbook1 is having Src1 worksheet
Workbook2 is having Src2 worksheet
Results.xls is having Dest1 worksheet which will have Src1-Src2 records
Results.xls is having Dest2 worksheet which will have Src2-Src1 records
Dim Workbook1, Workbook2, Results As Workbook
Dim Src1, Src2, Dest1, Dest2 As Sheet1
Application.DisplayAlerts = False
Application.EnableEvents = False
Application.ScreenUpdating = False
Windows("Workbook1.xls").Activate
Set Workbook1= ActiveWorkbook
Windows("Workbook2.xls").Activate
Set Workbook2= ActiveWorkbook
Windows("Results.xls").Activate
Set Results = ActiveWorkbook
'Renaming Results workbook sheet1 and sheet2 to Dest1 and Dest2
Results.Sheets(1).Name = "Dest1"
Results.Sheets(2).Name = "Dest2"
Workbook1.Activate
ActiveWorkbook.Sheets("Src1").Activate
Set Src1= ActiveSheet
Workbook2.Activate
ActiveWorkbook.Sheets("Src2").Activate
Set Src2= ActiveSheet
Results.Activate
ActiveWorkbook.Sheets("Dest1").Activate
Set Dest1 = ActiveSheet
ActiveWorkbook.Sheets("Dest2").Activate
Set Dest2 = ActiveSheet
Dim Src1rng As Range
Dim Src2rng As Range
'Select and assign range for Src1 sheet data
Src1.Activate
'Selecting range without headers by using offset(1,0)
Set Src1rng= Range("A1").CurrentRegion.Offset(1, 0)
'Select and assign range for Src2 sheet data
Src2.Activate
Set Src2rng= Range("A1").CurrentRegion.Offset(1, 0)
Dim row_not_exist As Boolean
'Select each row from the Src1rng
Src1.Activate
For Each Src1Row In Src1rng.Rows
row_not_exist = True
Src2.Activate
For Each Src2Row In Src2rng.Rows
'Comparing cell(s) in Src1rng with cell(s) with Src2rng
If Src1Row.Cells(1).Value = Src2Row.Cells(1).Value Then
If Src1Row.Cells(2).Value = Src2Row.Cells(2).Value Then
'if record exists in both sheets, no check needed further
row_not_exist = False
Exit For 'Don't compare with remaining records
End If
End If
Next Src2Row 'Go to next record in Src2
'If Src1rng record not exists in Src2rng then
'copy the Src1 record into Results workbook Dest1 sheet
If row_not_exist = True Then
Src1.Activate
Src1Row.Cells.Select
Selection.Copy
Dest1.Activate
ActiveCell.Offset(1, 0).Select
Dest1.Paste
Application.CutCopyMode = xlCopy
End If
Next Src1Row 'Go to next record in Src1
'we can find the viceversa by just changing the names from Src1 to Src2
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.ScreenUpdating = True
Dim Src1, Src2, Dest1, Dest2 As Sheet1
Application.DisplayAlerts = False
Application.EnableEvents = False
Application.ScreenUpdating = False
Windows("Workbook1.xls").Activate
Set Workbook1= ActiveWorkbook
Windows("Workbook2.xls").Activate
Set Workbook2= ActiveWorkbook
Windows("Results.xls").Activate
Set Results = ActiveWorkbook
'Renaming Results workbook sheet1 and sheet2 to Dest1 and Dest2
Results.Sheets(1).Name = "Dest1"
Results.Sheets(2).Name = "Dest2"
Workbook1.Activate
ActiveWorkbook.Sheets("Src1").Activate
Set Src1= ActiveSheet
Workbook2.Activate
ActiveWorkbook.Sheets("Src2").Activate
Set Src2= ActiveSheet
Results.Activate
ActiveWorkbook.Sheets("Dest1").Activate
Set Dest1 = ActiveSheet
ActiveWorkbook.Sheets("Dest2").Activate
Set Dest2 = ActiveSheet
Dim Src1rng As Range
Dim Src2rng As Range
'Select and assign range for Src1 sheet data
Src1.Activate
'Selecting range without headers by using offset(1,0)
Set Src1rng= Range("A1").CurrentRegion.Offset(1, 0)
'Select and assign range for Src2 sheet data
Src2.Activate
Set Src2rng= Range("A1").CurrentRegion.Offset(1, 0)
Dim row_not_exist As Boolean
'Select each row from the Src1rng
Src1.Activate
For Each Src1Row In Src1rng.Rows
row_not_exist = True
Src2.Activate
For Each Src2Row In Src2rng.Rows
'Comparing cell(s) in Src1rng with cell(s) with Src2rng
If Src1Row.Cells(1).Value = Src2Row.Cells(1).Value Then
If Src1Row.Cells(2).Value = Src2Row.Cells(2).Value Then
'if record exists in both sheets, no check needed further
row_not_exist = False
Exit For 'Don't compare with remaining records
End If
End If
Next Src2Row 'Go to next record in Src2
'If Src1rng record not exists in Src2rng then
'copy the Src1 record into Results workbook Dest1 sheet
If row_not_exist = True Then
Src1.Activate
Src1Row.Cells.Select
Selection.Copy
Dest1.Activate
ActiveCell.Offset(1, 0).Select
Dest1.Paste
Application.CutCopyMode = xlCopy
End If
Next Src1Row 'Go to next record in Src1
'we can find the viceversa by just changing the names from Src1 to Src2
Application.DisplayAlerts = True
Application.EnableEvents = True
Application.ScreenUpdating = True
Sample Output:
| Src1 Sheet data | Src2 Sheet data | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| ||||||||||||||||
| Dest1 Sheet | Dest2 Sheet | ||||||||||||||||
|
|
Note:
Dest1 contains the missing(intersection) data, which available in Src1 but not in Src2
Dest2 contains the missing(intersection) data, which available in Src2 but not in Src1
Please let me know if any further queries, contact me psrdotcom@gmail.com
September 14, 2010
PL/SQL Developer Useful Settings
Hi friends,
I am using Pl/Sql Developer IDE to connect different databases and performing different database operations at the same time. Its been proved that Pl/Sql developer is very useful tool for sql and/or plsql statement/query execution.
What I liked in Pl/Sql Developer are
What I have learn today is
i) Logon History
Are you able to remember all the username and passwords of different databases?
Fed up of typing username and password everytime when logging?
Use "Fixed Users" option in Logon History Preferences
We can create different menus to differentiate users or type of logons
Syntax:
>Menu
username/password@database
Example:
>Test
abc/abc123@xyz
def/def234@psr
Note:
Example: ghi/lkj@123@qwe
Here
but
pl/sql developer will treat
Because first @ onwards it will treat as database.
We can have many menus with many logon to connect different databases with very less effort.
Click the Logon Button Arrow and select the menu->username/password@database
It will get connected automatically without typing username and password
ii) Auto Replace facility
Open Pl/Sql Developer->Click on Tools->Preferences->Select Editor Preferences
Scroll down to AutoReplace tab and use the syntax and example to use the facility
syntax: shortcutword=full(part)command
example: saf = select * from
When you type saf and space then you can see select * from as a replacement of saf
I am using Pl/Sql Developer IDE to connect different databases and performing different database operations at the same time. Its been proved that Pl/Sql developer is very useful tool for sql and/or plsql statement/query execution.
What I liked in Pl/Sql Developer are
- Select some part of the query and execute the selected part in the query. I liked it very much.
- Export output result to excel as a table
- Code assistant which will display all the tables in that schema when you entered your_schema_name.
- Working in different windows like SQL window, Test window, Program window, Command window and Diagram window at the same time
- Macros which can do certain action once recorded
What I have learn today is
i) Logon History
Are you able to remember all the username and passwords of different databases?
Fed up of typing username and password everytime when logging?
Use "Fixed Users" option in Logon History Preferences
We can create different menus to differentiate users or type of logons
Syntax:
>Menu
username/password@database
Example:
>Test
abc/abc123@xyz
def/def234@psr
Note:
- More than one users under the same menu should be in next line
- Avoid @ usage in password because database delimeter is @ so it will treat first @ onwards as database
Example: ghi/lkj@123@qwe
Here
username: ghi
password: lkj@123
database: qwe
but
pl/sql developer will treat
username: ghi
password: lkj
database: 123@qwe
Because first @ onwards it will treat as database.
We can have many menus with many logon to connect different databases with very less effort.
Click the Logon Button Arrow and select the menu->username/password@database
It will get connected automatically without typing username and password
Very Useful .. Try it
ii) Auto Replace facility
Open Pl/Sql Developer->Click on Tools->Preferences->Select Editor Preferences
Scroll down to AutoReplace tab and use the syntax and example to use the facility
syntax: shortcutword=full(part)command
example: saf = select * from
When you type saf and space then you can see select * from as a replacement of saf
September 09, 2010
Excel VBA: Multi-selection Listbox using pop-up window to display column values
Description:
We have following excel sheet with the two columns Names and Requirednames.
Names column has all the names
Required Names column should have some selected name(s)
What we can do other than copy and paste?
We can create a pop-up window which will display all the names by using list box and we can select the required names from that list box.
Procedure:
You can see the sample output
We have following excel sheet with the two columns Names and Requirednames.
Names column has all the names
Required Names column should have some selected name(s)
| Names | Required Names |
|---|---|
| ABC,DEF,GHI | |
| PSR,DOT,COM |
What we can do other than copy and paste?
We can create a pop-up window which will display all the names by using list box and we can select the required names from that list box.
Procedure:
You can see the sample output
| Names | Required Names |
|---|---|
| ABC,DEF,GHI | ABC |
| PSR,DOT,COM | PSR,COM |
Note:
For any further queries and/or suggestions please contact psrdotcom@gmail.com
September 07, 2010
Bangalore to Tirupathi Weekend Travel for Lord Balaji darshan
Myself and my friend(Arya Kumar Mohanthy) started in Bangalore at around 10:30pm by KSRTC Volvo. It was nice journey and we reached Eadu Kondalu(Tirupathi) Bus Station at around 4:15am.
We stud in line for dharma dharshan Rs. 50/- ticket at bus station. We got ticket around 6:15AM. Then we went to Alapiri from where we started climbing all the 7 hills around 3550 steps. we had been reached there with in 3 hours.
We stud in line for dharshan and with god's grace we had very good dharshan with in 3 hours.
We took bus to Tirupathi and from there to Bangalore. We reached Bangalore at around 11:00PM.
Luckily Both reached home safely.
Thanks GOD
We stud in line for dharma dharshan Rs. 50/- ticket at bus station. We got ticket around 6:15AM. Then we went to Alapiri from where we started climbing all the 7 hills around 3550 steps. we had been reached there with in 3 hours.
We stud in line for dharshan and with god's grace we had very good dharshan with in 3 hours.
We took bus to Tirupathi and from there to Bangalore. We reached Bangalore at around 11:00PM.
Luckily Both reached home safely.
Thanks GOD
September 01, 2010
Learning Basics in Windows Scripting
I am trying to learn some basics in windows scripting.
What I am thinking like, If you are doing some similar work in some application in different times, Why can't we make it automated?
Ex:
1) For some mail, we know that, we will send the same content whenever it comes from some particular id. Can't we automate it?
2) We are running some java application and i will do some similar procedure every time, can't we automate the process?
Currently I am learning Windows Scripting.
References:
http://technet.microsoft.com/en-us/scriptcenter/dd940112.aspx
Please post comments if you have any idea
What I am thinking like, If you are doing some similar work in some application in different times, Why can't we make it automated?
Ex:
1) For some mail, we know that, we will send the same content whenever it comes from some particular id. Can't we automate it?
2) We are running some java application and i will do some similar procedure every time, can't we automate the process?
Currently I am learning Windows Scripting.
References:
http://technet.microsoft.com/en-us/scriptcenter/dd940112.aspx
Please post comments if you have any idea
Subscribe to:
Posts (Atom)
Featured Post
Java Introdcution
Please send your review and feedback to psrdotcom@gmail.com
-
Hi all, I spent 2 days on configuring this. I read lot of blogs and instrutction steps from various sites. I would like share my experienc...
-
For the academic purpose i had written a small program in Matlab. I have tried encoding and decoding the image by using Huffman coding. ...
-
Hi folks, Today we will see how we can get the folder path of the windows user specific app data for storing any program (app) based inform...