Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.excel.programming > #107923

Re: Macro to paste from clipboard

From Claus Busch <claus_busch@t-online.de>
Newsgroups microsoft.public.excel.programming
Subject Re: Macro to paste from clipboard
Date 2015-08-01 11:09 +0200
Organization A noiseless patient Spider
Message-ID <mpi2a4$ng$1@dont-email.me> (permalink)
References <t7-dnW0Rv_aewibInZ2dnUU78audnZ2d@brightview.co.uk>

Show all headers | View raw


Hi,

Am Fri, 31 Jul 2015 12:40:39 +0100 schrieb F:

> I've struggled, and failed, to write a macro to automate this. Can 
> anyone help?

why don't you write the values into C:F? Then you don't have to copy &
paste values. Paste the new data to K:L and then run the macro.

Sub Test()
Dim dest As Range

With ActiveSheet
    Set dest = .Cells(Rows.Count, 3).End(xlUp)(2)
    dest = Evaluate("=IF(INDEX($K$8:$K$151,MATCH(MAX($L$8:$L$151),$L$8:$L$151,0))" _
        & "<>""00:10"",INDEX($K$8:$K$151,MATCH(MAX($L$8:$L$151),$L$8:$L$151,0)),""No output"")")
    dest.Offset(, 1) = Evaluate("=MAX($L$8:$L$151)")
    dest.Offset(, 2) =
Evaluate("=INDEX(K8:K80,MATCH(TRUE,L8:L80<>0,0))")
    dest.Offset(, 3) =
Evaluate("=INDEX(K81:K151,MATCH(TRUE,L81:L151=0,0))")
End With
End Sub


Regards
Claus B.
-- 
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional

Back to microsoft.public.excel.programming | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Macro to paste from clipboard Claus Busch <claus_busch@t-online.de> - 2015-08-01 11:09 +0200
  Re: Macro to paste from clipboard F <news@nowhere> - 2015-08-03 10:52 +0100
    Re: Macro to paste from clipboard Claus Busch <claus_busch@t-online.de> - 2015-08-03 12:07 +0200
      Re: Macro to paste from clipboard Claus Busch <claus_busch@t-online.de> - 2015-08-03 12:12 +0200
    Re: Macro to paste from clipboard Claus Busch <claus_busch@t-online.de> - 2015-08-03 12:20 +0200
      Re: Macro to paste from clipboard F <news@nowhere> - 2015-08-03 12:01 +0100
        Re: Macro to paste from clipboard Claus Busch <claus_busch@t-online.de> - 2015-08-03 13:12 +0200

csiph-web