View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
broncoted[_2_] broncoted[_2_] is offline
external usenet poster
 
Posts: 1
Default How to copy a highlighted row


I guess what I need first is the following:

I want a user to highlight a row of information(just the part of the
row they want)

So lets say they highlight from C3 to C:10

In that range are the following information

5 (empty cell) 4 3 5 (empty cell) (empty cell) 8

I want to create a macro that reads the numbers in the highlighted
selection, while ignoring the empty cells so that when they copy it to
something else the output would be

5 4 3 5 8

I hope this makes sense.

Thanks again.




David McRitchie Wrote:
You could record a macro to get an idea of most of the code.
Both parts of your question are too ambiguous for me to understand.
Also what is the other application looking for -- is it a CSV file?

For instance copy your sheet
Edit, Move or copy, be sure to mark the check box to create a copy
Select all cells on the worksheet, then Ctrl+G, select blank cells,
Edit delete, shift left
File, Save As, comma separated variable file (CSV)
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"broncoted"
wrote in message
...

Hello,

Im a beginning VBA programmer here. Could someone give me an idea on
how to highlight a row of numbers and have the macro go down the
columns and check to see if a cell is empty and moving on to the

next
column if it is? Also, I would like to copy the numbers that ARE
present so I could copy it to another application. Thanks!


--
broncoted

------------------------------------------------------------------------
broncoted's Profile:

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

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



--
broncoted
------------------------------------------------------------------------
broncoted's Profile: http://www.excelforum.com/member.php...o&userid=36401
View this thread: http://www.excelforum.com/showthread...hreadid=561789