Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default IF or similar but true result to display in consecutive row

Im looking for something along the lines of IF but I want to return the
succesful results in consecutive rows. I cannot use filter or sort as
original data needs to be displayed on the same sheet in its original order.
eg if cell in Column A = X then return value from same row Column C in the
next available row in Column E.

Column A Column B Column C Column D Column E
Row A X ABC ABC
Row B X DEF GHI
Row C X GHI MNO
Row D X JKL
Row E X MNO

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default IF or similar but true result to display in consecutive row

Try this:

E1:
=INDEX($C$1:$C$10,SUMPRODUCT(SMALL((($A$1:$A$10="X ")*ROW($A$1:$A$10))+(($A$1:$A$10="")*10^99),ROWS($ E$1:E1))))

Is that something you can work with?
***********
Regards,
Ron

XL2002, WinXP


"Oldersox" wrote:

Im looking for something along the lines of IF but I want to return the
succesful results in consecutive rows. I cannot use filter or sort as
original data needs to be displayed on the same sheet in its original order.
eg if cell in Column A = X then return value from same row Column C in the
next available row in Column E.

Column A Column B Column C Column D Column E
Row A X ABC ABC
Row B X DEF GHI
Row C X GHI MNO
Row D X JKL
Row E X MNO

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF or similar but true result to display in consecutive row

Try this:

Entered as an array using the key combination of CTRL,SHIFT,ENTER (not just
ENTER):

=IF(ROWS($1:1)<=COUNTIF(A$1:A$5,"x"),INDEX(C$1:C$5 ,SMALL(IF(A$1:A$5="x",ROW(A$1:A$5)-MIN(ROW(A$1:A$5))+1),ROWS($1:1))),"")

Copy down until you get blanks.

Biff

"Oldersox" wrote in message
...
Im looking for something along the lines of IF but I want to return the
succesful results in consecutive rows. I cannot use filter or sort as
original data needs to be displayed on the same sheet in its original
order.
eg if cell in Column A = X then return value from same row Column C in
the
next available row in Column E.

Column A Column B Column C Column D Column E
Row A X ABC ABC
Row B X DEF GHI
Row C X GHI
MNO
Row D X JKL
Row E X MNO



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default IF or similar but true result to display in consecutive row

Thanks Biff

Another great solution
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default IF or similar but true result to display in consecutive row

You're welcome. Thanks for the feedback!

Biff

"Oldersox" wrote in message
...
Thanks Biff

Another great solution





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 24
Default IF or similar but true result to display in consecutive row

Thanks Ron. This is exctly what I needed.
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
Display the source for a pivot table page field Gary Brown Excel Worksheet Functions 4 November 8th 06 03:02 PM
How to convert Value to words?Eg.Rs.1000/- to Repees One thousand Shailendra Neema Excel Discussion (Misc queries) 1 September 14th 06 11:28 AM
Please Help Me with Custom menus Mr BT Excel Worksheet Functions 7 July 4th 06 05:15 PM
Stop renaming or moving sheet tabs sparx Excel Discussion (Misc queries) 9 May 16th 06 08:44 PM
Spellnumber Norman Jones Excel Worksheet Functions 6 December 13th 04 07:21 AM


All times are GMT +1. The time now is 12:14 AM.

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"