View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
triffidbook triffidbook is offline
external usenet poster
 
Posts: 18
Default Excluding VAT for selected item

The VBA code is:

Sub PARTS()
'
' PARTS Macro
' Macro recorded 05/09/2006
'
' Keyboard Shortcut: Ctrl+Shift+X
'
Range("A5").Select
Range("A4:D1571").AdvancedFilter Action:=xlFilterCopy,
CriteriaRange:=Range( _
"A1:A2"), CopyToRange:=Range("F4:I28"), Unique:=False
End Sub

"Dave F" wrote:

What's the VBA code you're using for the macro? Essentially you would need
to modify it to tell Excel to set the VAT for the last row of the relevant
range to 0.

If you don't know how to view the code behind a macro, right-click the tab
in which the macro operates and select View Code. Then copy all the code
into this post so that someone can take a look at it.

Dave
--
Brevity is the soul of wit.


"triffidbook" wrote:

I am using a spreadsheet which uses a macro to copy and pasted products onto
a selected area on the same worksheet. One of the items requires 0 VAT. Is
there anyway this can be achieved when the item could appear in one of 46
rows, it is always the last item to be shown on the pasted list, although it
is dependant on what is pasted above it as to which row it will be pasted.