Tag Archives: excel

excel 2007 2010 fill color not compatible 2003

When you save excel file, you got error: some cells or styles in this workbook contain formatting that is not supported by the selected file format. these formats will be converted to the closest format available.

Save excel file Compatibility Checker

Save excel file Compatibility Checker

Choose following colors: (colors which are supported by excel 2003)
– Black: RGB = 0 0 0
– White: RGB = 255 255 255
– Red: RGB = 255 0 0
– Green: RGB = 0 255 0
– Blue: RGB = 0 0 255
– Yellow: RGB = 255 255 0
– Magenta: RGB = 255 0 255
– Cyan: 0 255 255

You only need remember 0 and 255 are simple keys.

Colors excel 2003 RGB

Colors excel 2003 RGB

Excel simple colors

Excel simple colors

If you want to fill with more colors, you can use 0 and 128 (instead of 255) as simple keys.

Các phím tắt hay sử dụng khi dùng Excel

F2: Sửa nội dung một ô (cell)
Ctrl + F3: Mở hộp thoại định nghĩa name (áp dụng khi link mã lỗi chẳng hạn)
Ctrl + K: Link ô tới đâu đó (http://, name, sheet, cell…)
F4: Lặp lại thao tác gần nhất?! Ví dụ sau khi bạn Insert 1 row (Chuột phải – Insert) nếu nhấn F4 thì sẽ lại Insert thêm 1 row nữa. Hay sau khi chọn vài cell – chọn Merge; bạn chọn vài cell khác dí F4 thì các cell đó cũng sẽ được merge với nhau.

Ctrl + PageUp, Ctrl + PageDown: Di chuyển tới/lui giữa các worksheet

Insert current datetime in Excel

Insert a static date or time:
Current date: Select a cell and press CTRL+;
Current time: Select a cell and press CTRL+SHIFT+;
Current date and time: Select a cell and press CTRL+; then SPACE then CTRL+SHIFT+;

Insert a date or time whose value is updated
To do this task, use the TODAY and NOW functions.

VBA function MoneyFromNote

Function MoneyFromNote(ByVal note As String)
    
    Dim RE As RegExp, REMatches As MatchCollection, REMatch As Match
    Set RE = CreateObject("vbscript.regexp")
    With RE
        .MultiLine = False
        .Global = True
        .IgnoreCase = True
        .Pattern = "([\+0-9\.,]+)([MK])"
    End With
    
    Set REMatches = RE.Execute(note)
    r = 0
    For i = 0 To REMatches.Count – 1
        Set REMatch = REMatches.Item(i)
        unit = REMatch.SubMatches(1)
        num = REMatch.SubMatches(0)
        
        num = Replace(num, ",", ".")
        If unit = "M" Then
            va = num * 1000000
        ElseIf unit = "K" Then
            va = num * 1000
        End If
        If Mid(num, 1, 1) = "+" Then va = 0 – va
        'MsgBox num & " " & unit & " = " & va
        r = r – va
    Next
    'MsgBox r
    MoneyFromNote = Int(r)
End Function

‘Usage example
‘=MoneyFromNote(“Quần đùi: 30K; Áo ba lỗ: 25K; Thịt ba chỉ: 15K”)
‘Sẽ thu được: -70000

Minh họa hàm MoneyFromNote trong Excel