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: 2
Default Macro to combine several worksheet formulas

Simple question(I think) - from a newbie

Ok, I have looked through here and I know cleaning up names is difficult. The thing is I have all the formulas I need to do it, and for my data it works every time. I was just wondering if there was a way to put them into a macro so that I don't have to use so many columns and cut and paste. Here is how everything is layed out.

Column "A" - Names
Column "B" - =TRIM(A2)
Column "C" - =IF(ISERROR(FIND(" ",A2,1)),A2,LEFT(A2,FIND(" ",A2,1)-1))
Column "D" - =IF(ISERROR(FIND(" ",A2,FIND(" ",A2)+1)),RIGHT(A2,LEN(A2)-FIND(" ",A2)),RIGHT(A2,LEN(A2)-FIND_
(" ",A2,FIND(" ",A2)+1)-0))
Column "E" - =CONCATENATE(D2," ",C2)
Then I copy and paste the values from "E" back into "A"

So I take raw names that have extra spaces and middle initials - I seperate ou tand get first and last names and then concatnate them together. What I am wondering is if I can use a macro that can do all of this in place so that I don't have to use so many columns and copy and paste these formulas. Since I don't know how many names are in each file I need it to do it all the way down column "A" untill the cell is blank.

I am sure this is simple, but my knowledge of macros doesn't go much past recording them.

If anybody can show me how to do something like this it would be greatly appreciated, as it would save me alot of time since I have to repeat this process on many workbooks.

Thanks for your time,

Emily Suskovich
 
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
Combine Formulas Canon Excel Discussion (Misc queries) 1 October 24th 09 02:31 PM
Macro changes formulas on destination worksheet Karen Excel Discussion (Misc queries) 2 August 12th 08 11:07 PM
How to merge / combine several worksheets into one new worksheet without VBA / Macro? FOR EXPERTS [email protected] Excel Worksheet Functions 9 August 13th 07 04:19 AM
Help combine 2 formulas into 1 Robert Excel Worksheet Functions 5 April 1st 05 08:55 AM
Macro to add formulas to added worksheet Mal[_3_] Excel Programming 0 July 31st 03 08:48 AM


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