Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Auto Generate Sorting table(empty cell)??

Previous I try the formula below, but NOT WORKING IF COLUMN HAVE EMPTY CELL..
Please help!!

SHEET 1
colA colB
order1 3
order2
order3 2
order4
order5 1
order6

SHEET 2 (sort by colB)
colA colB
order5 1
order3 2
order1 3
order2
order4
order6




In Sheet2,

Put in A1:
=IF(ISERROR(SMALL($C:$C,ROW())),"",IF(INDEX(Sheet1 !A:A,MATCH(SMALL($C:$C,ROW()
),$C:$C,0))=0,"",INDEX(Sheet1!A:A,MATCH(SMALL($C:$ C,ROW()),$C:$C,0))))

Copy A1 to B1

Put in C1:
=IF(AND(Sheet1!A1="",Sheet1!B1=""),"",IF(AND(Sheet 1!A1<"",Sheet1!B1=""),
10^10+ROW(),Sheet1!B1+ROW()/10^10))

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1

  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Auto Generate Sorting table(empty cell)??

You probably have invisible whitespaces in col B, which TRIM can handle

Just replace the formula in C1 with this:
=IF(AND(Sheet1!A1="",TRIM(Sheet1!B1)=""),"",IF(AND (Sheet1!A1<"",TRIM(Sheet1!B1)=""),10^10+ROW(),She et1!B1+ROW()/10^10))
Copy C1 down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"daniellchiu via OfficeKB.com" <u36625@uwe wrote in message
news:79de3554ef1fb@uwe...
Previous I try the formula below, but NOT WORKING IF COLUMN HAVE EMPTY
CELL..
Please help!!

SHEET 1
colA colB
order1 3
order2
order3 2
order4
order5 1
order6

SHEET 2 (sort by colB)
colA colB
order5 1
order3 2
order1 3
order2
order4
order6




In Sheet2,

Put in A1:
=IF(ISERROR(SMALL($C:$C,ROW())),"",IF(INDEX(Sheet1 !A:A,MATCH(SMALL($C:$C,ROW()
),$C:$C,0))=0,"",INDEX(Sheet1!A:A,MATCH(SMALL($C:$ C,ROW()),$C:$C,0))))

Copy A1 to B1

Put in C1:
=IF(AND(Sheet1!A1="",Sheet1!B1=""),"",IF(AND(Sheet 1!A1<"",Sheet1!B1=""),
10^10+ROW(),Sheet1!B1+ROW()/10^10))

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200710/1



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
Auto Generate Sorting table?? daniellchiu via OfficeKB.com Excel Discussion (Misc queries) 3 October 18th 07 12:31 PM
Pivot Table counts an empty cell Dave Excel Discussion (Misc queries) 1 April 17th 07 03:27 PM
How to auto count data in an empty cell to be 0. Blank cell=0 Jagneel Excel Discussion (Misc queries) 5 December 13th 06 08:17 PM
cell auto population - why 0 when source cell is empty? David Smithz Excel Discussion (Misc queries) 4 June 18th 06 05:35 PM
Auto sorting a table JOHN ROBERTS Charts and Charting in Excel 1 August 30th 05 03:16 AM


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