Showing posts with label Columns. Show all posts
Showing posts with label Columns. Show all posts

March 21, 2012

Excel Macro to Split Cell Data with Delimiter and Copy in other Columns

Hi all,
Today I have written one more small macro in Excel to split the data with the delimiter and copy to the columns which are beside to the data.


Sub splitdata()

Dim data As String
Dim values As Variant
Dim i As Long

    Set DataRange = Range("A1").CurrentRegion
    Range("A1").Select
    For Each cell In Range("A1").CurrentRegion
       
        'Getting text from the cell
        data = cell.Text
       
        'MsgBox ("Data :" & data)
       
        'Gettings Values
        values = split(data, ",")
       
        For i = 0 To UBound(values)
            'MsgBox ("Value is: " & values(i))
            'Splitting to other columns
            cell.Offset(0, i + 1).Value = values(i)

        Next i

    Next cell  
 

'Autofit the content to the column
    Cells.EntireColumn.AutoFit
   
End Sub


Please send your feedback and comments to psrdotcom@gmail.com

January 30, 2012

Hide/Unhide Microsoft Excel 2007 Rows/Columns to Protect your data

Hi Friends,
Do you want to hide[protect] the data then please follow the steps

Step 1: User left click in "Microsoft Excel - Book1"
Step 2: User mouse drag start in "Microsoft Excel - Book1" to select the rows
Step 3: User mouse drag end in "Microsoft Excel - Book1" to finish the row selection

Step 4: User right click on any of the selected row number in "Microsoft Excel - Book1" to get the row selection menu

Step 5: User left click on "Hide (menu item)" to hide the rows along with data

Step 6: User right click in "Microsoft Excel - Book1" to unhide the hidden rows

Step 7: User left click on "Unhide (menu item)" to get the data back

Step 8: Now User can see the rows along with the data

Step 9: User right click in "Microsoft Excel - Book1" to see the column selection pop-up menu

Step 10: User left click on "Hide (menu item)" to hide the columns along with the data

Step 11: User right click in "Microsoft Excel - Book1" to get the pop-up

Step 12: User left click on "Unhide (menu item)" to get the data back

Step 13: See the unhidden columns along with data now













































































Featured Post

Java Introdcution

Please send your review and feedback to psrdotcom@gmail.com