Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying a formula in a blank column as far as data in previous column


Hi

I wish to automate a formula that I have for removing duplicate
telephone numbers.

When recording a macro, I want to paste the formula as far down as the
last number (the quantity of numbers to deduplicate will usually be
different each time ) which is situated in the previous column.

Is there a way that I can achieve this, rather than having to paste
down the whole column?

Many Thanks


--
basildon
------------------------------------------------------------------------
basildon's Profile: http://www.excelforum.com/member.php...o&userid=29700
View this thread: http://www.excelforum.com/showthread...hreadid=494135

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying a formula in a blank column as far as data in previous column

assume you are pasting in column C and using column B as a reference

Dim rng as Range
Set rng = Range(Range("B1"),Range("B1").End(xldown))
set rng = rng.offset(0,1)
rng(1).copy Destination:=rng

--
Regards,
Tom Ogilvy

"basildon" wrote in
message ...

Hi

I wish to automate a formula that I have for removing duplicate
telephone numbers.

When recording a macro, I want to paste the formula as far down as the
last number (the quantity of numbers to deduplicate will usually be
different each time ) which is situated in the previous column.

Is there a way that I can achieve this, rather than having to paste
down the whole column?

Many Thanks


--
basildon
------------------------------------------------------------------------
basildon's Profile:

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



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
Based on data in previous column - sum of values in next column Beena K Excel Worksheet Functions 1 April 7th 09 07:23 PM
Copy a formula into a blank column only to the last data row Kebbon Excel Worksheet Functions 4 August 16th 07 11:43 PM
Shortcut to select column with data in previous column TJAC Excel Discussion (Misc queries) 1 July 10th 07 06:12 PM
How to add a new column with the previous column formula? arshia22 Excel Programming 1 March 3rd 05 05:48 PM
Populating column N with a formula if column A is Null or Blank Steve Excel Programming 4 September 28th 04 01:50 PM


All times are GMT +1. The time now is 07:08 AM.

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"