Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 173
Default Arrange to present in continuous format

Dear expert,

I have excel file and sor the fields selectively depending on the criteria ...
Anyway, the outcome will be like this.

A1
Elton
B1
Kammi
C1 (blank)
D1 (blank)
E1
27-year
F1
Room 33
G1 (blank)
H1
Holiday

How I can write a function so that ... say cell C1 to C9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other rows
....
So wanna use function command to solve first. Thanks for help





  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 173
Default Arrange to present in continuous format

OOOh I said wrongly.
It should be

A1
Elton
A2
Kammi
A3 (blank)
A4 (blank)
A5
27-year
A6
Room 33
A7 (blank)
A8
Holiday

How I can write a function so that ... say cell B1 to B9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other rows
...
So wanna use function command to solve first. Thanks for help





"Elton Law" wrote:

Dear expert,

I have excel file and sor the fields selectively depending on the criteria ...
Anyway, the outcome will be like this.

A1
Elton
B1
Kammi
C1 (blank)
D1 (blank)
E1
27-year
F1
Room 33
G1 (blank)
H1
Holiday

How I can write a function so that ... say cell C1 to C9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other rows
...
So wanna use function command to solve first. Thanks for help





  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default Arrange to present in continuous format

Give this a try, just set the Source and DestinationStartCell variable to
the range and cell that you want...

Sub TransposeWithoutBlanks()
Dim Index As Long, OffsetAmount As Long
Dim Source As Range, DestinationStartCell As Range
Set Source = Range("A1:H1")
Set DestinationStartCell = Range("B2")
For Index = 1 To Source.Count
If Source(Index).Value < "" Then
DestinationStartCell.Offset(OffsetAmount).Value = Source(Index).Value
OffsetAmount = OffsetAmount + 1
End If
Next
End Sub

NOTE: You can't overwrite your actual data with this method, so I used B2
instead of the B1 that you asked for as the start cell for the output list.
If you really do want to overwrite the original data, you can just move the
output range into the correct location at the end of the above code.

--
Rick (MVP - Excel)


"Elton Law" wrote in message
...
OOOh I said wrongly.
It should be

A1
Elton
A2
Kammi
A3 (blank)
A4 (blank)
A5
27-year
A6
Room 33
A7 (blank)
A8
Holiday

How I can write a function so that ... say cell B1 to B9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other
rows
...
So wanna use function command to solve first. Thanks for help





"Elton Law" wrote:

Dear expert,

I have excel file and sor the fields selectively depending on the
criteria ...
Anyway, the outcome will be like this.

A1
Elton
B1
Kammi
C1 (blank)
D1 (blank)
E1
27-year
F1
Room 33
G1 (blank)
H1
Holiday

How I can write a function so that ... say cell C1 to C9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other
rows
...
So wanna use function command to solve first. Thanks for help






  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,836
Default Arrange to present in continuous format

Sorting would group those items together, but maybe you don't want them in
alpha-order. Try this:
=IF(ROWS($1:1)<=COUNTA(A1:A20),INDEX(A1:A20,SMALL( IF(A1:A20<"",ROW(A1:A20)-MIN(ROW(A1:A20))+1),ROWS($1:1))),"")\\Enter
with Ctrl + Shift + Enter, not just Enter

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Elton Law" wrote:

OOOh I said wrongly.
It should be

A1
Elton
A2
Kammi
A3 (blank)
A4 (blank)
A5
27-year
A6
Room 33
A7 (blank)
A8
Holiday

How I can write a function so that ... say cell B1 to B9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other rows
...
So wanna use function command to solve first. Thanks for help





"Elton Law" wrote:

Dear expert,

I have excel file and sor the fields selectively depending on the criteria ...
Anyway, the outcome will be like this.

A1
Elton
B1
Kammi
C1 (blank)
D1 (blank)
E1
27-year
F1
Room 33
G1 (blank)
H1
Holiday

How I can write a function so that ... say cell C1 to C9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other rows
...
So wanna use function command to solve first. Thanks for help





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Arrange to present in continuous format

Hi,

Filter the column on non blanks, copy and then paste the data

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Elton Law" wrote in message
...
OOOh I said wrongly.
It should be

A1
Elton
A2
Kammi
A3 (blank)
A4 (blank)
A5
27-year
A6
Room 33
A7 (blank)
A8
Holiday

How I can write a function so that ... say cell B1 to B9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other
rows
...
So wanna use function command to solve first. Thanks for help





"Elton Law" wrote:

Dear expert,

I have excel file and sor the fields selectively depending on the
criteria ...
Anyway, the outcome will be like this.

A1
Elton
B1
Kammi
C1 (blank)
D1 (blank)
E1
27-year
F1
Room 33
G1 (blank)
H1
Holiday

How I can write a function so that ... say cell C1 to C9 ... etc
Display as
Elton
Kammi
27-year
Room 33
Holiday

It skips all the blank row and display continuously in consecutive rows.
I cannot use filter and delete the blank row as this will affect other
rows
...
So wanna use function command to solve first. Thanks for help







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
Condition Format where no formula present RingDing Excel Worksheet Functions 2 September 1st 09 08:24 AM
Format cells and font by content/whether formula present LJT87 Excel Worksheet Functions 2 January 8th 09 07:22 PM
How to format in stones & pounds and then present on chart Pete Harris Excel Discussion (Misc queries) 1 January 4th 09 02:43 PM
Continuous Formulas Kulakula Excel Discussion (Misc queries) 4 May 27th 05 10:02 PM
how to use time format to present negative value? ex. -00:42 min hass Excel Discussion (Misc queries) 4 April 19th 05 06:04 AM


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