Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Data Adjustment

Thanks Guys for all the answers.

Regards
Prasad Vanka


sbakker wrote:
Well this is how I would do it quick and dirty ;)


Code:
--------------------
Sub RmvBlanks()
Dim rngMyRange As Range
Dim rngCurRow As Range
Dim lCount, lInnerCount As Long
Dim lColumns As Long


Set rngMyRange = Selection
lColumns = rngMyRange.Columns.Count
'Loop through each row of selection
For Each rngCurRow In rngMyRange.Rows
lInnerCount = 1
'Loop through each column of the current row
For lCount = 1 To lColumns
'If Cell is no empty copy the value to the next open cell from the

left
If rngCurRow.Columns(lCount) < vbNullString Then
rngCurRow.Columns(lInnerCount) = rngCurRow.Columns(lCount)
If lInnerCount < lCount Then
rngCurRow.Columns(lCount) = ""
End If
lInnerCount = lInnerCount + 1
End If
Next lCount
Next rngCurRow
End Sub
--------------------


--
sbakker

------------------------------------------------------------------------
sbakker's Profile:

http://www.excelforum.com/member.php...o&userid=23645
View this thread:

http://www.excelforum.com/showthread...hreadid=373072

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
Row Height Adjustment on data Imported into excel Lisa Excel Worksheet Functions 1 September 23rd 09 12:39 AM
Code Adjustment albertmb Excel Discussion (Misc queries) 3 April 7th 09 05:51 PM
Using Cell Data as adjustment to formula references Gadgetgw Excel Worksheet Functions 2 October 6th 08 01:42 AM
formula adjustment Candace Excel Worksheet Functions 2 November 3rd 07 10:02 PM
VBA adjustment for beginner mpb1 Excel Programming 2 July 25th 03 04:44 AM


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