Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Return Formula results to specific row of matched criteria

Hi All,

I am using a conditional Formula to meet various criteria:

The formula does return the correct and expected results. However, I would
like the row positioning of the results changed. At the moment, the TRUE
result 0 is returned against the first instance of matched pattern "B"; I
would like the TRUE result 0 returned to the row of the second instance of
matched pattern "B". The FALSE result is the value in the row above +1
(sequential count until criteria is met).

Sample of data (text letters will vary):
B
##
A
B
##

Expected Results
B
##
A
B Would like 0 (zero) here. At the moment it returns to the first instance
of "B".
##

Thanks
Sam

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default Return Formula results to specific row of matched criteria

Hi Sam,

Assuming your data are in column A1:A10, then the following formula in, say, B1 & copied down will cause your main formula's result
to appear against the first occurrence only:
=IF(COUNTIF($A$1:A1,A1)1,0,"Rest of your formula")
and the following formula will cause your main formula's result to appear against the last occurrence only:
=IF(COUNTIF($A$1:A1,A1)<COUNTIF(A$1:A$10,A1),0,"R est of your formula")

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Sam via OfficeKB.com" <u4102@uwe wrote in message news:77eb624dc18aa@uwe...
Hi All,

I am using a conditional Formula to meet various criteria:

The formula does return the correct and expected results. However, I would
like the row positioning of the results changed. At the moment, the TRUE
result 0 is returned against the first instance of matched pattern "B"; I
would like the TRUE result 0 returned to the row of the second instance of
matched pattern "B". The FALSE result is the value in the row above +1
(sequential count until criteria is met).

Sample of data (text letters will vary):
B
##
A
B
##

Expected Results
B
##
A
B Would like 0 (zero) here. At the moment it returns to the first instance
of "B".
##

Thanks
Sam

--
Message posted via http://www.officekb.com


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 247
Default Return Formula results to specific row of matched criteria

Hi macropod,

Thank you for reply and assistance. Apologies for delay in returning to Post.
My data range is dynamic.

Further help appreciated.

macropod wrote:
Hi Sam,


Assuming your data are in column A1:A10, then the following formula in, say, B1 & copied down will cause your main formula's result
to appear against the first occurrence only:
=IF(COUNTIF($A$1:A1,A1)1,0,"Rest of your formula")


and the following formula will cause your main formula's result to appear against the last occurrence only:
=IF(COUNTIF($A$1:A1,A1)<COUNTIF(A$1:A$10,A1),0," Rest of your formula")

Can the above formula be modified to use a dynamic range, rather than fixed?

Cheers,
Sam

--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 329
Default Return Formula results to specific row of matched criteria

hi Sam,

The first one is dynamic as is. For the second one, you could use:
=IF(COUNTIF($A$1:A1,A1)<COUNTIF(A$:A$,A1),0,"Rest of your formula")
to test the whole of column A. Not strictly dynamic, but it works much the same.

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Sam via OfficeKB.com" <u4102@uwe wrote in message news:780333be1325a@uwe...
Hi macropod,

Thank you for reply and assistance. Apologies for delay in returning to Post.
My data range is dynamic.

Further help appreciated.

macropod wrote:
Hi Sam,


Assuming your data are in column A1:A10, then the following formula in, say, B1 & copied down will cause your main formula's
result
to appear against the first occurrence only:
=IF(COUNTIF($A$1:A1,A1)1,0,"Rest of your formula")


and the following formula will cause your main formula's result to appear against the last occurrence only:
=IF(COUNTIF($A$1:A1,A1)<COUNTIF(A$1:A$10,A1),0, "Rest of your formula")

Can the above formula be modified to use a dynamic range, rather than fixed?

Cheers,
Sam

--
Message posted via http://www.officekb.com


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
Return Matched Numeric Labels across Single Row Sam via OfficeKB.com Excel Worksheet Functions 4 January 5th 07 11:31 PM
Return Matched Numeric Values across Rows Sam via OfficeKB.com Excel Worksheet Functions 2 January 2nd 07 11:03 PM
Return Title to matched column [email protected] New Users to Excel 1 February 21st 06 06:04 AM
How to compare 2 lists and return un-matched? RWR Excel Worksheet Functions 1 February 15th 05 10:25 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM


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