Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default sumproduct issues?

Hi I have code using sumproduct to copy paste duplicate names into another
sheet.
I have used sumproduct so that the process is quick. But I can't do things
like TRim. Ucase or even compare duplicates just with first letter in
firstname col. Anyone knows if this can be achieved while using sumproduct ?
Or if theres an alternative method that is as effecient time as sumproduct
Thanks in Advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default sumproduct issues?

Sorry here is my current code

Rng(1).Offset(0, Rng.Columns.Count).EntireColumn.Insert
Set Col = Rng.Offset(, Rng.Columns.Count).Resize(, 1).Cells
Set colF = Intersect(Rng, Rng.Columns(strFNameCol & ":" & strFNameCol)).Cells
Set colL = Intersect(Rng, Rng.Columns(strLNameCol & ":" & strLNameCol)).Cells

Col.Formula = "=if(Sumproduct(--(" & colF.Address & "=" & colF(1).Address(0,
1) _
& "),--(" & colL.Address & "=" & colL(1).Address(0, 1) & "))1,na(),"""")"
On Error Resume Next
Col.SpecialCells(xlFormulas, xlErrors).EntireRow.Copy
Set sh = ActiveWorkbook.Worksheets.Add
Set k = sh.Range("A:AV")
k.Rows.PasteSpecial

Col.SpecialCells(xlFormulas, xlErrors).EntireRow.Delete
On Error GoTo 0
Col.EntireColumn.Delete

Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
"vbastarter" wrote:

Hi I have code using sumproduct to copy paste duplicate names into another
sheet.
I have used sumproduct so that the process is quick. But I can't do things
like TRim. Ucase or even compare duplicates just with first letter in
firstname col. Anyone knows if this can be achieved while using sumproduct ?
Or if theres an alternative method that is as effecient time as sumproduct
Thanks in Advance

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default sumproduct issues?

Since you code shows you are writing a formula to a cell, then you shouldn't
be limited beyond the limitations you would find in entering the formula by
hand.

Sumproduct will work with worksheet functions Trim, Left, Upper, but is has
to be in the resulting formula, not in VBA.

If you want to get the best advice on writing sumproduct formulas, ask in
Microsoft.public.excel.worksheet.functions

--
Regards,
Tom Ogilvy

"vbastarter" wrote in message
...
Hi I have code using sumproduct to copy paste duplicate names into another
sheet.
I have used sumproduct so that the process is quick. But I can't do

things
like TRim. Ucase or even compare duplicates just with first letter in
firstname col. Anyone knows if this can be achieved while using sumproduct

?
Or if theres an alternative method that is as effecient time as

sumproduct
Thanks in Advance



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUMPRODUCT ISSUES Rbirdie Excel Worksheet Functions 2 March 12th 10 04:10 PM
sumproduct issues Steve Excel Worksheet Functions 2 June 22nd 09 08:02 PM
Sumproduct issues SteveDB1 Excel Worksheet Functions 25 June 3rd 09 04:58 PM
Sumproduct issues. Lewiselw Excel Worksheet Functions 1 March 25th 08 03:12 PM
sumproduct issues jxbeeman Excel Worksheet Functions 1 February 25th 08 04:06 PM


All times are GMT +1. The time now is 06:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"