Thread: Data Adjustment
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Rob Rob is offline
external usenet poster
 
Posts: 718
Default Data Adjustment

maybe you could try something like this:

for rownumber=FirstRow to LastRow
for columnnumber=FirstColumn to Lastcolumn
if cells(rownumber,columnnumber)=0 then
cells(rownumber,columnnumber).delete
end if
next
next







" wrote:

Hi,

I have a worksheet with 5 address columns (Addr, Addr2, Addr3, Addr4
and Addr5) with values populated. There are some rows with values in
all the cells and some with values in only few columns.

Overall this sheet has 9000 rows.

My task is to go through each row and see if the filled cells are in
order. If not for eg., addr1 has value, addr2 hasn't and then addr3 has
then I will have to move addr3 to addr4.

Finally my sheet will have rows with address details in consecutive
cells without any gaps or empty cells in between.

Can someone please tell me a quick way to achieve this.

I guess I might need to use sorting but right now I can't figure it out
how do I do this.

Thanks & Regards
Prasad