#1   Report Post  
excelFan
 
Posts: n/a
Default help column

hi all,
is there a way to avoid greating a help column (to strip the numbers from
column A) as in my case where i have a range containing items like
A1=2000 name1
A2=1500 name2
A3=700 otherName
A4=500 name1
A5=""
A6=1500 name1
.....
now i want to sumproduct for ( name1) only.
many thanks for any help










  #2   Report Post  
Ken Wright
 
Posts: n/a
Default

Assuming example given is representative of all records:-

=SUMPRODUCT(--(LEFT(A2:A2000,FIND(" ",A2:A2000)-1)),--(MID(A2:A2000,FIND("
",A2:A2000)+1,LEN(A2:A2000))="name1"))

or switch name1 for a cell reference, BUT, its very bad practice indeed to
store numeric data in the same place as textual data and do what you are
doing. Far far better to use something like Data / Text To Columns and
split them up into two separate columns.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"excelFan" wrote in message
...
hi all,
is there a way to avoid greating a help column (to strip the numbers from
column A) as in my case where i have a range containing items like
A1=2000 name1
A2=1500 name2
A3=700 otherName
A4=500 name1
A5=""
A6=1500 name1
....
now i want to sumproduct for ( name1) only.
many thanks for any help












  #3   Report Post  
excelFan
 
Posts: n/a
Default

Thanks Ken Wright, your formula is of great help
but how about if the " " is not found in the empty cells of the range?
i hope you can help
with many thanks again

"Ken Wright" wrote:

Assuming example given is representative of all records:-

=SUMPRODUCT(--(LEFT(A2:A2000,FIND(" ",A2:A2000)-1)),--(MID(A2:A2000,FIND("
",A2:A2000)+1,LEN(A2:A2000))="name1"))

or switch name1 for a cell reference, BUT, its very bad practice indeed to
store numeric data in the same place as textual data and do what you are
doing. Far far better to use something like Data / Text To Columns and
split them up into two separate columns.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"excelFan" wrote in message
...
hi all,
is there a way to avoid greating a help column (to strip the numbers from
column A) as in my case where i have a range containing items like
A1=2000 name1
A2=1500 name2
A3=700 otherName
A4=500 name1
A5=""
A6=1500 name1
....
now i want to sumproduct for ( name1) only.
many thanks for any help













  #4   Report Post  
Fred Smith
 
Posts: n/a
Default

Ken already answered that question. Use Text to Columns.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


"excelFan" wrote in message
...
Thanks Ken Wright, your formula is of great help
but how about if the " " is not found in the empty cells of the range?
i hope you can help
with many thanks again

"Ken Wright" wrote:

Assuming example given is representative of all records:-

=SUMPRODUCT(--(LEFT(A2:A2000,FIND("
",A2:A2000)-1)),--(MID(A2:A2000,FIND("
",A2:A2000)+1,LEN(A2:A2000))="name1"))

or switch name1 for a cell reference, BUT, its very bad practice indeed
to
store numeric data in the same place as textual data and do what you are
doing. Far far better to use something like Data / Text To Columns and
split them up into two separate columns.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"excelFan" wrote in message
...
hi all,
is there a way to avoid greating a help column (to strip the numbers
from
column A) as in my case where i have a range containing items like
A1=2000 name1
A2=1500 name2
A3=700 otherName
A4=500 name1
A5=""
A6=1500 name1
....
now i want to sumproduct for ( name1) only.
many thanks for any help















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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
Format cell in column B based on value in the next cell (column c) Nicole Excel Discussion (Misc queries) 7 May 18th 05 10:19 PM
Comparing Cells and Displaying Data Keith Brown Excel Worksheet Functions 1 February 9th 05 05:42 PM
Copying the contents of a column into a chart Richard Excel Worksheet Functions 1 November 16th 04 02:39 PM
How to calculate the data in excel 2002 including only the last 9. TylerMaricich Excel Worksheet Functions 6 November 8th 04 07:27 AM


All times are GMT +1. The time now is 04:47 AM.

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"