ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   RESIZE of matrix by MARCO (https://www.excelbanter.com/excel-programming/341920-resize-matrix-marco.html)

sreedhar[_4_]

RESIZE of matrix by MARCO
 

hi

MY problem is to resize the matrix after deletion for example

problem matrix:

1 0 1 0 1
0 0 1 0 1
1 0 0 1 0
0 1 0 0 1
1 0 0 1 0
...............
...............

for example after deleting rows 2 and 4 like this

1 0 1 0 1

1 0 0 1 0

1 0 0 1 0
................
................

we have to resize the matrix by bring 3 row into 2 and if 4 exist i
should be in 3 else if 5 row exist it should bring to 3 row likewis
end of the page.

1 0 1 0 1
1 0 0 1 0
1 0 0 1 0

so can any one plz help me regarding this as soon as possible

thanks
sre

--
sreedha
-----------------------------------------------------------------------
sreedhar's Profile: http://www.excelforum.com/member.php...fo&userid=2758
View this thread: http://www.excelforum.com/showthread.php?threadid=47324


Patrick Molloy[_2_]

RESIZE of matrix by MARCO
 
Sub RemoveBlankRows()
Columns("A:A").SpecialCells(xlCellTypeBlanks).Dele te Shift:=xlUp
End Sub


manually:
1 select the column
2 F5 click Special
3 select blanks, then click OK
4 with the pointer over a selected cell, right click & select delete



"sreedhar" wrote:


hi

MY problem is to resize the matrix after deletion for example

problem matrix:

1 0 1 0 1
0 0 1 0 1
1 0 0 1 0
0 1 0 0 1
1 0 0 1 0
...............
...............

for example after deleting rows 2 and 4 like this

1 0 1 0 1

1 0 0 1 0

1 0 0 1 0
................
................

we have to resize the matrix by bring 3 row into 2 and if 4 exist it
should be in 3 else if 5 row exist it should bring to 3 row likewise
end of the page.

1 0 1 0 1
1 0 0 1 0
1 0 0 1 0

so can any one plz help me regarding this as soon as possible

thanks
sree


--
sreedhar
------------------------------------------------------------------------
sreedhar's Profile: http://www.excelforum.com/member.php...o&userid=27582
View this thread: http://www.excelforum.com/showthread...hreadid=473241



sreedhar[_6_]

RESIZE of matrix by MARCO
 

hi patrick,

thanks for u'r help but,
by using u'r marco i am able copy single column A only

Sub RemoveBlankRows()
Columns("A:A").SpecialCells(xlCellTypeBlanks).Dele te Shift:=xlUp
End Sub


but i want actually to copy all columns and rows.

for example
1 1 0 1 1

0 1 0 1 1
1 0 1 0 1
...............
u'r code is doing only


1 1 0 1 1
0
1 1 0 1 1
0 1 0 1
................

but i need by runing single marco

it should perform

1 1 0 1 1
0 1 0 1 1
1 0 1 0 1
..................

like this it should copy all rows and columns to the blanks spaces
above

plz ,help me regards this

thanks,
sree


--
sreedhar
------------------------------------------------------------------------
sreedhar's Profile: http://www.excelforum.com/member.php...o&userid=27582
View this thread: http://www.excelforum.com/showthread...hreadid=473241


sreedhar[_7_]

RESIZE of matrix by MARCO
 

hi patrick

thank buddy i go it

by justing changing the columns ("a:z")

Sub RemoveBlankRows()
Columns("A:A").SpecialCells(xlCellTypeBlanks).Dele te Shift:=xlUp
End Su

--
sreedha
-----------------------------------------------------------------------
sreedhar's Profile: http://www.excelforum.com/member.php...fo&userid=2758
View this thread: http://www.excelforum.com/showthread.php?threadid=47324



All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com