OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

SUMPRODUCT + ISNUMBER + SEARCH + WILCARD STARTING BY

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
drtduarte
Newbie
Newbie


Joined: 15 Oct 2009
Posts: 4

PostPosted: Mon Feb 13, 2012 3:55 am    Post subject: SUMPRODUCT + ISNUMBER + SEARCH + WILCARD STARTING BY Reply with quote

Dear Friends,

After some time searching on forums I found the functions for what I'm trying to do, however I still need to fix a litle detail.

Formula I'm using:

=SUMPRODUCT(A1:A4=219270001;(ISNUMBER(SEARCH("96.*";B1:B4)));C1:C4)

A________ --- B________ --- C
219270001 --- 961222444 --- 120
219270001 --- 934459610 --- 100
219270002 --- 961222444 --- 130
219270001 --- 916231444 --- 4

The problem is that "96.*" or "96", returns also C on 934459610, if I use "96*" it is even worse as it returns also C on 916231444.

Do you know how to return only when started by 96?

Regards,
David D.
Back to top
View user's profile Send private message
karolus
OOo Advocate
OOo Advocate


Joined: 22 Jun 2011
Posts: 210

PostPosted: Mon Feb 13, 2012 4:42 am    Post subject: Reply with quote

Hi
=SUMPRODUCT(A1:A4=219270001;(ISNUMBER(SEARCH("^96.*";B1:B4)));C1:C4)

Karo
Back to top
View user's profile Send private message
gerard24
OOo Enthusiast
OOo Enthusiast


Joined: 08 Jul 2011
Posts: 100
Location: France

PostPosted: Mon Feb 13, 2012 4:59 am    Post subject: Reply with quote

.* is useless.

Code:
=SUMPRODUCT(A1:A4=219270001;(ISNUMBER(SEARCH("^96";B1:B4)));C1:C4)

_________________
LibreOffice 3.5.0 on Windows Vista
Back to top
View user's profile Send private message
drtduarte
Newbie
Newbie


Joined: 15 Oct 2009
Posts: 4

PostPosted: Tue Feb 14, 2012 12:33 am    Post subject: Reply with quote

Hello there,

Thanks a lot for your replies.
However I tried both solutions and none of them work, I get 0 results with both, did you test them?
Back to top
View user's profile Send private message
drtduarte
Newbie
Newbie


Joined: 15 Oct 2009
Posts: 4

PostPosted: Tue Feb 14, 2012 12:39 am    Post subject: Reply with quote

Hi again,

It is working, sorry for my prior reply, the problem was that I needed to activate again the use of regular expressions, as I'm using a xls doc, each time I open the document I need to activate it...

A huge thank you for your help, I would never find out the ^ use in formulas.

Take care,
David
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group