LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ruatha
 
Posts: n/a
Default Repeat in functions?


Hi.
I've writte an function that looks for a word in column B and searches
for that word in a column in a different worksheet, when found it
returns a word found in column B in that row.

For example:

Worksheet "Schema":

A B C D
1 a hi zoo now
2 b go now zoo
3 c lo zoo zoo


worksheet "home":
A B C D
1 a zoo
2 b zoo
3 c now

Now the formula in worksheet "home" cell C1 should look for zoo
(content in B1) in column C in worksheet "Schema" and return "hi lo".
The formula in cell D1 should look for zoo (B1) in column D in "schema"
and return "go lo":
ie:
worksheet "home":
A B C D
1 a zoo hi lo go lo
2 b zoo hi lo go lo
3 c now go hi

this is the current formula:

Code:
--------------------


=OM(ÄRSAKNAD(FÖRSKJUTNING(Schema!A1;PASSA($B20;Sch ema!D$1:Schema!D$400;0)-1;0));"-";FÖRSKJUTNING(Schema!$A$1;PASSA($B20;Schema!D$1:S chema!D$400;0)-1;0))

--------------------

or in english:

Code:
--------------------


=IF(ISMISSING(DISPLACEMENT(Schema!A1;WATCH($B20;Sc hema!D$1:Schema!D$400;0)-1;0));"-";DISPLACEMENT(Schema!$A$1;WATCH($B20;Schema!D$1:S chema!D$400;0)-1;0))

--------------------



(My translation) (Displacement moves relativeley, WATCH finds the
content in one cell in another column)

Now the problem, it only finds the first occasion and only returns one
value, can it be repeated in some easy way to return every (up to 5)
occasions in the column.


--
Ruatha
------------------------------------------------------------------------
Ruatha's Profile: http://www.excelforum.com/member.php...o&userid=31083
View this thread: http://www.excelforum.com/showthread...hreadid=507578

 
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
Can I get Excel to determine the line curve formula without graph. Cadelima Excel Discussion (Misc queries) 8 December 20th 05 09:57 PM
User-defined functions created in Excel 2000 fail in Excel 2003 goodguy Excel Discussion (Misc queries) 1 October 3rd 05 07:04 PM
Database functions should use criteria in formula, as 1-2-3 does 123user Excel Worksheet Functions 8 September 29th 05 08:57 PM
Title Cut Off if Rows to Repeat & Columns to Repeat are Both Selec unibaby Excel Discussion (Misc queries) 2 August 24th 05 04:29 PM
Visible rows and functions that work tracy Excel Worksheet Functions 2 August 19th 05 05:25 AM


All times are GMT +1. The time now is 04:51 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"