Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem excel 2010, ako sa z indexoveho zoznamu harkov presunut na dany harok 1 klikom

1, Ked budes mat viac casu, napis prosim, rad by som sa k tomu vratil.


2, Ked si otvorim novy cisty excel subor, kuknem do VBA, stale tam vidim tu vatu, co tam asi nema byt. Ale on si ju tam sam vytvoril, tak nechapem tomu:
http://i.imgur.com/C1OIt38.png
Naco to tam je ?


3, Ziskal som odniekial makro, ktore vymiena navzajom dva stlpce, riadky, bunky ak potrebujem. Ale v zdrojaku su asi komenty ze:

'--verify that Area 2 rows follow area 1 rows
'--so that adjacent single column swap will work.

'--verify that Area 2 columns follow area 1 columns
'--so that adjacent single column swap will work.
Mozete si to skusit u seba ci to funguje spolahlivo ?
Kedze makra sa nedaju Undo (alebo ano ? nejakym inym makrom ?), nechcem aby mi to posahalo v buducnosti nejaku dolezitu a velku tabulku.

Sub SwapSelectedCells_ZDLHAVE()
    Dim uiSource As Range
    Dim uiDestination As Range
    Dim temp As Variant
     
    On Error Resume Next
    Set uiSource = Application.InputBox("Select the source range", Default:=Selection.Address, Type:=8)
    On Error GoTo 0
    If uiSource Is Nothing Then Exit Sub: Rem cancel pressed.
     
    On Error Resume Next
    Set uiDestination = Application.InputBox("Select the other range", Type:=8)
    On Error GoTo 0
    If uiDestination Is Nothing Then Exit Sub: Rem cancel pressed.
     
    With uiSource
        temp = .Value
        .Value = uiDestination.Resize(.Rows.Count, .Columns.Count).Value
        uiDestination.Resize(.Rows.Count, .Columns.Count).Value = temp
    End With
End Sub







Sub SwapSelectedCells_RYCHLE()

    If Selection.Areas.Count <> 2 Then Exit Sub

    Set range1 = Selection.Areas(1)
    Set range2 = Selection.Areas(2)

    If range1.Rows.Count <> range2.Rows.Count Or _
        range1.Columns.Count <> range2.Columns.Count Then Exit Sub

    range1Address = range1.Address
    range1.Cut
    range2.Insert Shift:=xlShiftToRight
    Range(range1Address).Delete Shift:=xlToLeft

    range2Address = range2.Address
    range2.Cut
    Range(range1Address).Insert Shift:=xlShiftToRight
    Range(range2Address).Delete Shift:=xlToLeft

End Sub






Sub SwapRows_RYCHLE()
Dim xlong As Long
If Selection.Areas.Count <> 2 Then
MsgBox "Must have exactly two areas for swap." & Chr(10) _
& "You have " & Selection.Areas.Count & " areas."
Exit Sub
End If
If Selection.Areas(1).Columns.Count <> Cells.Columns.Count Or _
Selection.Areas(2).Columns.Count <> Cells.Columns.Count Then
MsgBox "Must select entire Rows, insufficient columns"
Exit Sub
End If
Dim areaSwap1 As Range, areaSwap2 As Range, onepast2 As Range
'--verify that Area 2 rows follow area 1 rows
'--so that adjacent single column swap will work.
If Selection.Areas(1)(1).Row > Selection.Areas(2)(1).Row Then
Range(Selection.Areas(2).Address & "," & Selection.Areas(1).Address).Select
Selection.Areas(2).Activate
End If
Set areaSwap1 = Selection.Areas(1)
Set areaSwap2 = Selection.Areas(2)
Set onepast2 = areaSwap2.Offset(areaSwap2.Rows.Count, 0).EntireRow
areaSwap2.Cut
areaSwap1.Resize(1).EntireRow.Insert Shift:=xlShiftDown
areaSwap1.Cut
onepast2.Resize(1).EntireRow.Insert Shift:=xlShiftDown
Range(areaSwap1.Address & "," & areaSwap2.Address).Select
xlong = ActiveSheet.UsedRange.Columns.Count 'correct lastcell
End Sub





Sub SwapColumns_RYCHLE()
Dim xlong As Long
If Selection.Areas.Count <> 2 Then
MsgBox "Must have exactly two areas for swap." & Chr(10) _
& "You have " & Selection.Areas.Count & " areas."
Exit Sub
End If
If Selection.Areas(1).Rows.Count <> Cells.Rows.Count Or _
Selection.Areas(2).Rows.Count <> Cells.Rows.Count Then
MsgBox "Must select entire Columns, insufficient rows " _
& Selection.Areas(1).Rows.Count & " vs. " _
& Selection.Areas(2).Rows.Count & Chr(10) _
& "You should see both numbers as " & Cells.Rows.Count
Exit Sub
End If
Dim areaSwap1 As Range, areaSwap2 As Range, onepast2 As Range
'--verify that Area 2 columns follow area 1 columns
'--so that adjacent single column swap will work.
If Selection.Areas(1)(1).Column > Selection.Areas(2)(1).Column Then
Range(Selection.Areas(2).Address & "," & Selection.Areas(1).Address).Select
Selection.Areas(2).Activate
End If
Set areaSwap1 = Selection.Areas(1)
Set areaSwap2 = Selection.Areas(2)
Set onepast2 = areaSwap2.Offset(0, areaSwap2.Columns.Count).EntireColumn
areaSwap2.Cut
areaSwap1.Resize(, 1).EntireColumn.Insert Shift:=xlShiftToRight
areaSwap1.Cut
onepast2.Resize(, 1).EntireColumn.Insert Shift:=xlShiftToRight
Range(areaSwap1.Address & "," & areaSwap2.Address).Select
xlong = ActiveSheet.UsedRange.Rows.Count 'correct lastcell
End Sub

4, Dnes som si vsimol nieco zvlastne v spravani excelu, co som predtym este asi nezazil.

A, Byvalo: Mam v bunke nieco napisane. Chcem to zmenit, tak 2x lavym mysitkom kliknem do bunky a ukaze sa vnutri bunky to blikajuce vertikalne nieco (ako sa to vola ? napr. aj teraz ked pisem toto), na mieste kurzora ako bol (napr aj v strede slova).
Teraz: Ale teraz to vobec nereaguje ! Dvojklikom sa neviem dostat do bunky pre upravu obsahu. Preco ?

B, Byvalo: Klavesou F2 uprava obsahu bunky. Cely obsah oznaceny nacierno. Ked hned zacnem pisat, cele sa to zmaze-nahradi prave pisanym.
Teraz: Nic nie je v bunke vyznacene, iba hore v riadku pre vzorce a to vertikalne oznacovadlo je na konci obsahu bunky, cize mozem hned dopisovat a nic nezmazem.

C, Byvalo: Napisem text do bunky. Napr.: 'slovo slovo'. Potom hned do bunky pod tym, zacinam pisat 'slo' - a ukaze sa mi navrhovana ponuka 'slovo slovo', je to cele cierne a ked pisem dalej stale vidim to vertikalne oznacovadlo.
Teraz: Tiez ponukne a vyplni navrhovany obsah, ale nie je to cierne, cierne je iba hore v tom vzorcovom riadku a v bunke nemam to vertikalne oznacovadlo.


Neviem prist preco sa mi vsetko takto pomenilo a same od seba !?

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny