LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combine 2 columns in a dynamic range into one

Hi -

I have a dynamic list in a worksheet of Forename (A2) and Surname (B2). This list changes every quarter so is not a set length (i.e. the number of rows will change)

I need to run a macro that will combine the first name and surname of all entries in this list into another location (E1).

I have been using a simple worksheet function (=A2&" "&B2), but am encountering issues with other functions returning errors when there are formulas in cells I need to treat as blank cells - so I think a macro is the way forwards.

I have recorded a macro that works for the active cell but am struggling to apply this to the entire list:

ActiveCell.FormulaR1C1 = _
"='SquadLists Import'!RC[-8]&"" ""&'SquadLists Import'!RC[-7]"
Range("E3").Select

I would also need to get the macro to delete any previous list creation in E1 before it pastes the new list in (in the event that there are fewer names in a new quarter).

Appreciate any help on this, VBA is very much a language I am learning!!

 
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
Dynamic Range for multiple columns Robin Excel Discussion (Misc queries) 8 April 3rd 23 02:26 PM
creating a dynamic range based on criteria, within a dynamic range, and passing it to a function [email protected] Excel Programming 0 October 9th 07 05:22 PM
Drawing data from specific columns of a dynamic range Darren Setting up and Configuration of Excel 3 March 3rd 06 06:53 AM
Using specific columns of a dynamic range Darren Excel Programming 0 March 2nd 06 10:27 AM
Counting Columns in Dynamic Range ExcelMonkey[_102_] Excel Programming 1 March 4th 04 10:22 PM


All times are GMT +1. The time now is 11:54 AM.

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"