Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Problem with Sumif and Right()

I am trying to use sumif to add up a column of data. The hitch is I want to
compare the last four right characters of each line contained in the range.
My code is

xlrng2 & 4 are Dim as Range
xlApp.Range("m21") = xlApp.WorksheetFunction.SumIf(Right(xlRng2, 4), "CPCT",
xlRng4)


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Problem with Sumif and Right()

xlrng2 & 4 are Dim as Range
xlApp.Range("m21") = xlApp.WorksheetFunction.SumIf(xlRng2, "*CPCT",xlRng4)

--
Regards,
Tom Ogilvy


"JEff" wrote in message
...
I am trying to use sumif to add up a column of data. The hitch is I want

to
compare the last four right characters of each line contained in the

range.
My code is

xlrng2 & 4 are Dim as Range
xlApp.Range("m21") = xlApp.WorksheetFunction.SumIf(Right(xlRng2, 4),

"CPCT",
xlRng4)




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
sumif problem vincent135 Excel Discussion (Misc queries) 3 June 14th 06 03:08 PM
Sumif problem robi Excel Worksheet Functions 4 May 30th 06 06:31 AM
SUMIF Problem Ray A Excel Discussion (Misc queries) 1 November 10th 05 12:34 AM
SUMIF problem Easydoesit Excel Worksheet Functions 5 June 16th 05 10:17 PM
SUMIF problem Aussie CPA Excel Worksheet Functions 1 February 18th 05 12:37 AM


All times are GMT +1. The time now is 11:34 PM.

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

About Us

"It's about Microsoft Excel"