Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How To: Macro Command To Reference Populated Cells Only

Is there a macro command line that I can use that will referenc
populated cells only?

My example: I have Column A populated. This may be cells A1 - A
(meaning A? = will vary). In column B, I have a macro command to ad
".

What I want to be able to do is this: run my macro and have it add th
" only those populated cells in column A.

Right now, I select cell B1 and type the formula ".
then manually copy and paste this formula to the remain cells in colum
B to the point where the cells are populated in column A. I'd like t
be able to automate this process via a macro.

Thanks!

TJ

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default How To: Macro Command To Reference Populated Cells Only

option explicit
sub testme01()

dim wks as worksheet

set wks = activesheet
with wks
with .range("a1",.cells(.rows.count,"A").end(xlup)).off set(0,1)
.formula = """
.value = .value
end with
end with
end sub

This'll do it from A1 to the last used cell in column A.

"TJM <" wrote:

Is there a macro command line that I can use that will reference
populated cells only?

My example: I have Column A populated. This may be cells A1 - A?
(meaning A? = will vary). In column B, I have a macro command to add
".

What I want to be able to do is this: run my macro and have it add the
" only those populated cells in column A.

Right now, I select cell B1 and type the formula ". I
then manually copy and paste this formula to the remain cells in column
B to the point where the cells are populated in column A. I'd like to
be able to automate this process via a macro.

Thanks!

TJM

---
Message posted from http://www.ExcelForum.com/


--

Dave Peterson

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How To: Macro Command To Reference Populated Cells Only

Thank you!

--
Message posted from http://www.ExcelForum.com

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
Macro that sort on clnm populated by indirect [email protected] Excel Discussion (Misc queries) 2 March 2nd 07 03:45 PM
A SIMPLER FORMULA TO GET A REFERENCE OF WHICH COLUMN IS POPULATED Ravi Excel Worksheet Functions 7 July 15th 05 10:34 AM
Macro Help: Concatenate Populated Cells in Column A TJM Excel Discussion (Misc queries) 3 June 11th 05 11:25 AM
how do populate empty cells with the contents of populated cells . Jim99 Excel Discussion (Misc queries) 6 April 21st 05 05:44 PM
Populated cells Al Excel Programming 2 May 24th 04 03:39 PM


All times are GMT +1. The time now is 03:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"