Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default removing blank entries from an array


i have an array of strings. i'm trying to make a function that will
return the arry without blank entries.

input would be: "text"/"words"/""/"more words"/""
result woud be: "text"/"words"/"more words"


--
TheIrishThug
------------------------------------------------------------------------
TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682
View this thread: http://www.excelforum.com/showthread...hreadid=494693

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default removing blank entries from an array

j = lbound(ar) - 1
for i = lbound(ar) to ubound(ar)
if ar(i) < "" then
j = j + 1
ar(j) = ar(i)
end if
Next
Redim Preserve ar(lbound(ar) to j)

--
Regards,
Tom Ogilvy


"TheIrishThug"
wrote in message
news:TheIrishThug.20b0wb_1135024501.6801@excelforu m-nospam.com...

i have an array of strings. i'm trying to make a function that will
return the arry without blank entries.

input would be: "text"/"words"/""/"more words"/""
result woud be: "text"/"words"/"more words"


--
TheIrishThug
------------------------------------------------------------------------
TheIrishThug's Profile:

http://www.excelforum.com/member.php...o&userid=29682
View this thread: http://www.excelforum.com/showthread...hreadid=494693



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default removing blank entries from an array


thanks Tom

Tom Ogilvy Wrote:
j = lbound(ar) - 1
for i = lbound(ar) to ubound(ar)
if ar(i) < "" then
j = j + 1
ar(j) = ar(i)
end if
Next
Redim Preserve ar(lbound(ar) to j)

--
Regards,
Tom Ogilvy


"TheIrishThug"

wrote in message
news:TheIrishThug.20b0wb_1135024501.6801@excelforu m-nospam.com...

i have an array of strings. i'm trying to make a function that will
return the arry without blank entries.

input would be: "text"/"words"/""/"more words"/""
result woud be: "text"/"words"/"more words"


--
TheIrishThug

------------------------------------------------------------------------
TheIrishThug's Profile:

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

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



--
TheIrishThug
------------------------------------------------------------------------
TheIrishThug's Profile: http://www.excelforum.com/member.php...o&userid=29682
View this thread: http://www.excelforum.com/showthread...hreadid=494693

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
removing duplicate entries armagan Excel Discussion (Misc queries) 1 June 12th 06 05:42 PM
SPREADSHEET SUMMARY MACRO REMOVING BLANK ENTRIES piper New Users to Excel 1 March 10th 06 09:24 PM
Removing duplicate entries. dh01uk Excel Discussion (Misc queries) 2 January 13th 06 03:51 PM
Copying and pasting a worksheet to a blank and removing blank rows Bob Reynolds[_3_] Excel Programming 0 June 24th 04 02:55 PM
Removing duplicate entries Billy[_3_] Excel Programming 7 January 9th 04 07:47 AM


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