Funzione copia



  • Funzione copia
    di Pixxelite (utente non iscritto) data: 11/04/2010

    Salve a tutti,
    vorrei chiedere se è possibile copiare il contenuto di una cella attraverso una funzione...mi spiego...

    volevo usare questa funzione
    =se(g25>100;l4=a2;"")in modo che se il valore in g25 è maggiore di 100 il valore (testuale) di a2 venga copiato nella cella l4 altrimenti se minore di 100 la cella venga lasciata vuota...
    ...il problema è che come risultato mi da falso come se la variabile "se vero" fosse errata...
    c'e un modo per risolvere il problema?
    il massimo che sono riuscito a concludere è questa funzione:
    =se(g25>100;indice(a1:d9;2;1);"")che non fa altro che, se la funzione se risulta vera, riportare il valore testuale nella colonna 1 della riga indicata...ma a me serve avere questo output in una cella diversa

    grazie mille


  • Formattazione pesante
    di Anto65 (utente non iscritto) data: 11/04/2010

    Salve a tutti.
    chiedo aiuto per poter velocizzare questa operazione:
    ho la necessità di formattare il colore delle celle di un area molto estesa che corrispondino ad una certa condizione, il fatto è che per ogni singola cella ci vuole un tempo di elaborazione infinito , ci sarebbe qualche soluzione ?
    grazie per un eventuale aiuto.
     
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim CL As Object
    For Each CL In Range("Q18:R135")  'per ogni cella in A1:F100
    If CL.Value = "ST1" Then     'se il valore della cella è uguale ad A
    CL.Interior.ColorIndex = 41    'mi metti il colore del carattere uguale a rosso, 'ecc. ecc.
    ElseIf CL.Value = "ST2" Then   'se invece il valore è uguale a B ecc.ecc
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST3" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST4" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST5" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST6" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST7" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST8" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST9" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST10" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST11" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST12" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST13" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST14" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST15" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST16" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST17" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST18" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST19" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST20" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST21" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST22" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST23" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST24" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST25" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST26" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST27" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST28" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST29" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "ST30" Then
    CL.Interior.ColorIndex = 41
    ElseIf CL.Value = "A1" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A2" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A1" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A3" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A4" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A5" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A6" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A7" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A8" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A9" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A10" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A11" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A12" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A13" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A14" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A15" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A16" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A17" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A18" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A19" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A20" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A21" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A22" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A23" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A24" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A25" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A26" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A27" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A28" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A29" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "A30" Then
    CL.Interior.ColorIndex = 34
    ElseIf CL.Value = "B1" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B2" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B3" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B4" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B5" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B6" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B7" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B8" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B9" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B10" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B11" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B12" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B13" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "B14" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C1" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C2" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C3" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C4" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C5" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C6" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C7" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C8" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C9" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C10" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C11" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C12" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C13" Then
    CL.Interior.ColorIndex = 36
    ElseIf CL.Value = "C14" Then
    CL.Interior.ColorIndex = 36
    End If
    Next
    End Sub



  • di Fede (utente non iscritto) data: 12/04/2010

    Rispondo a pixxelite.

    visto che la formula la vai già a scrivere nella cella i4, non va indicato tale dato anche nella formula stessa.
    prova a scrivere: =se(g25>100;a2;"")

    fammi sapere, ciao.
    fede