Quick VB Question

Hi,

I'm just wanting to know what this code does?

I wrote it ages ago, and I cant get it to work!!

Thanks,

Sub Connects()
Dim intRow As Integer
Dim txt As String
intRow = 1
Do Until IsEmpty(Cells(intRow, 1))
Cells(intRow, 1) = Cells(intRow, 1) & "  " & Cells(intRow, 2)
Cells(intRow, 2).ClearContents
Range(Cells(intRow, 1), Cells(intRow, 2)).Merge
intRow = intRow + 1
Loop
Columns(1).AutoFit
End Sub


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

0
12/17/2003 11:22:19 AM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
485 Views

Similar Articles

[PageSpeed] 7

Basically it works done a range in column A and for each cell appends the
value found next door in column B.  Then it deletes what was in the column B
cell and creates a single merged cell out of the col A and B cells.

-- 
Jim Rech
Excel MVP


0
jrrech (1933)
12/17/2003 12:49:33 PM
Reply:

Similar Artilces:

Chart question
I am trying to make a chart that shows 2009 numbers versus 2008 numbers and here is my issue: I have 4 cities Chicago(A1), Dallas(A2), Detroit(A3), and Los Angeles(A4) that I have for 2008 and 2009 but I added 2 cities for 2009. Is there a way to do a vlookup to pull the data for the chart or do I have to set up the data sheets the same way...I tried to make this short so sorry if its not enough info, just let me know if I can clear something up. Thanks in advance You should put your new cities in A5 and A6 (just their names --- <grin>) In B5 and B6 enter =NA() which wil...

Copying certain column information quickly
As you know in Excel you could quickly copy the information you needed with a drag of the mouse. Because I need information copied repeatedly and easily for my access unfirmiliar co workers. Example JOB CUSTOMER QUOTE # A B1 110701 A(copied) A2 110701 (copied) A(copied) C4 110701 (copied) How do I do this quickly and efficiently for the computer challenged. Sorry, Access is a database, not a spreadsheet, and can't be used like one. You can write some code to select the rows that you want to ...

Question: Exchange and AD
In AD sites and services there is an entry for our exchange 2000 server with a folder called "Exchange Services" under it. Is this left over from an Exchange 5.5 ADC or is it needed for Exchange 2000/2003? We have two exchange server and neither one is a front end server but we only have an entry in AD for one of our servers. If it is needed for Exchange 2000/2003 should there be an entry for the other server? What is the entry in AD used for? ...

Using VB to pull formats and data from another workbook
Is there a way in VB code so if a cell in another workbook has color formatting it will automatically fill in another field on the first workbook? Example. Workbook1.xls contains list venders, unique vender numbers are in column B, and in column N represents the vender being paid, while column O represents the check to the vendor is on hold. Workbook2.xls contains list of all venders and all payments. Column C contains the unique vendor numbers, and column T contains when the vender was paid, and if the cell in column T is highlighted then the check is on hold. So I would l...

A few questions
Hi, I am trying to automate a few tasks at work and would like to get Excel to do a few different things. I am new to excel programming, so if someone could just give me a shove in the right direction I'd appreciate it. When we open a workbook I would like to always have it open to a "Main Menu" area. Then I would like to be able to choose "P" for payroll and the correct sheet would open. I also would like to be able to automate inserting a blank payroll sheet into the active sheet. So I think it would go like this... I would finish with this weeks data entry are...

question on reassigning account
When we reassign account, the new owner gets ownership of all the open items underneath the accounts. (For example, the Cases for the account!). Is there a way to change the ownership for accounts without affecting the ownership of the child records? There isn't any way to avoid this in the current version. -- Matt Wittemann http://icu-mscrm.blogspot.com "smitzer" wrote: > When we reassign account, the new owner gets ownership of all the open items > underneath the accounts. (For example, the Cases for the account!). Is there > a way to change the ownership for...

lookup question
I am having trouble figuring out how to look something up in a list based on conditions. For example I have: Store # State Open Date 1 ND 1/2/03 2 SD 2/4/03 in a list with approx 350 records which all have this same info. I need to create another table that shows which stores opened in which state in each month. So, I need to say if the open date is in January (or between Jan 1 & Jan 31) & the state is ND then I need the cell the formula is in to read 1. Basically if the op...

Quick help with excel formula
Ok, i need a forumla. this is what I want, i have two columns like this Time Start: ............. Time Finish: ............ I fill out these two columns like this Time Start: ...17:42... Time Finish: ...18:25.. Now i have another Column that says Training Length: ........ I want this to work out the time between 17:42 and 18:25 Any one help pleas -- Message posted from http://www.ExcelForum.com Hi simply =A2-A1 and format as time If your training time can span midnight use the formula =A2-A1+(A2<A1) >-----Original Message----- >Ok, i need a forumla. > >this is what ...

populating from sheets -- and PLEASE don't tell me I need VB!
Stupid newbie question, Excel 2003: I have a 2 sheet document. SOME of the info from Sheet 1 needs to appear on Sheet 2. For example, Sheet 1 Column G values need to be populated to Sheet 2 as Column B, Column H needs to be Column D, etc. Is there any way to automate this without having to write a VB script? I know a macro could kind of do it, but I don't think it could take all the parameters, since Sheet 1 is constanly being altered (i.e., new values, etc.). Oh, and all rows are relational so that G3 value from Sheet 1 when it goes to Sheet 2 B17 also has to have H3 from Shee...

Quick Question
I have been using Office 2007 and OneNote for some time now and have recently set up the 2010 Beta on a second system. In the 2007 version there was a way to repair office if things went flaqky. How do I do that in Office 2010? Michael On Tue, 8 Dec 2009 23:59:26 +0000 (UTC), Rev. Michael L. Burns <sdbpastor@charter.bet> wrote: > >I have been using Office 2007 and OneNote for some time now and have recently >set up the 2010 Beta on a second system. In the 2007 version there was a >way to repair office if things went flaqky. How do I do that in Office 2...

Past Questions and Answers
Hello How can I find out past questions and answers for a specific topic? I lost the answer to my question, which was posted here last week? thank you I'd use google. Give it enough information (keywords/author/subject): http://groups.google.com/advanced_search?&as_ugroup=microsoft.public.excel.*&num=100 da wrote: > > Hello > How can I find out past questions and answers for a specific topic? I lost > the answer to my question, which was posted here last week? > thank you -- Dave Peterson ...

Create and open a workbook in VB.net ?
Going from VBA VB6. Can anyone point me to a good group ? "Kjeldc" skrev: > Going from VBA TO VB6. Can anyone point me to a good group ? There are specialist VB groups, like VB.OLE, VB.Databases, etc., and a VB.General.Discussion. But what does that have to do with VB.Net? -- HTH RP (remove nothere from the email address if mailing direct) "Kjeldc" <Kjeldc@discussions.microsoft.com> wrote in message news:285DA285-CFD9-4A69-A9C5-FBDC33611EF2@microsoft.com... > Going from VBA VB6. Can anyone point me to a good group ? ...

Re: VB Command
"L�on Hajduk" <l.hajduk@yahoo.com> a �crit dans le message de news:... > > "Jasper Recto" <jrecto99@yahoo.com> a �crit dans le message de > news:OK3Khy1nKHA.1552@TK2MSFTNGP04.phx.gbl... >>I have a button that runs the function below. It opens an excel document. >>I also have other funtion that opens up other documents whether it be a >>word or pdf docuement. >> >> This command opens each document in an explorer window. >> >> How can I make a generic command that will open up the file in its nativ...

License Question
I know a user needs a license to the Sales module to see it in CRM client, but does a user need a Sales License to use CRM Sales For Outlook? Or will just a standard license do? Anybody know? From what I have read in the IG the license you pruchase for the Sales (or Customer Service) module will entitle you to use both the web browser interface and/or the Outlook client interface with no additional cost. Panayiotis On Thu, 15 Apr 2004 10:01:10 -0700, Heather Bain <anonymous@discussions.microsoft.com> wrote: >I know a user needs a license to the Sales module to see it in CRM cl...

Is there a quick way to...
highlighting only the odd or even numbered rows? Thanks. Something like this should do: Sub banding() ActiveSheet.Range("A65536").Select Selection.End(xlUp).Select lastrow = ActiveCell.Row Range("A6:AK" & lastrow).Select Selection.Interior.ColorIndex = xlNone 'Change rownum to the the first row number where data occurs rownum = 6 For i = 1 To (lastrow - rownum) Step 2 Range("B" & rownum + i & ":AK" & rownum + i).Select With Selection.Interior .ColorIndex = 15 .Pattern = xlSolid End With ...

Quick campaign- change to all quick campaigns
Does any one know how to set the following to default. In the quick campaign view, change 'my quick campaigns' to 'all quick campaigns' Cheers Sid ...

Conditional Formatting Question #7
I want to use a formala to conditionally format cell E1 to highlight with a green background if cell A4=C4 and Cell B4<D4 how can this be done? Rollin --- Message posted from http://www.ExcelForum.com/ Hi Rollin select cell E1, choose format / conditional formatting choose formula is type =AND(A4=C4,B4<D4) click on the format button - set your format, click OK twice hope this helps Cheers JulieD "Rollin_Again >" <<Rollin_Again.1coop2@excelforum-nospam.com> wrote in message news:Rollin_Again.1coop2@excelforum-nospam.com... > I want to use a formala to...

Quick Links Copy
Is there any way to copy Quick Links from one GP 10 user to another? Rich, I assume by "quick links" you are referring to the items on the user's Shortcut Bar. If this is correct, you can run the following query: INSERT INTO [DYNAMICS].[dbo].[SY01990] ([ScbGroupType] ,[ScbOwnerID] ,[ScbNodeID] ,[ScbParentNodeID] ,[ScbShortcutType] ,[ScbSubType] ,[ScbDisplayName] ,[ScbShortcutKey] ,[ScbTargetStringOne] ,[ScbTargetStringTwo] ,[ScbTargetStringThree] ...

Quick Part
When i add a new custom field E.g {DOCPROPERTY "Transaction Comments" }to my document (Type: Text) there is a restriction to 255 characters. Is there any way to increase this? Or is this a M/S word restriction that cannot be changed? Catherine wrote: > When i add a new custom field E.g {DOCPROPERTY "Transaction > Comments" }to my document (Type: Text) there is a restriction to 255 > characters. > Is there any way to increase this? Or is this a M/S word restriction > that cannot be changed? It is a restriction that can't be changed. I d...

Formula Question? #2
Hello All, I am cuurently using this expression to count "Job" in an array. =COUNTIF(Database!K4:K15000,"Job") What I am looking for is a way to find this in a string of possible answers This answer may have "Job" ,but not the first in a line of possible answer ex: "Gui Job Run Exp" / "Run Exp Gui Job"/ etc... I've tried using "*" to find any "Job" in the array, but I thnk that the formula is looking at the first part of the answer only. Is there any other way of doing this without typing every possbile comb with &q...

Time Series Question
I have a line graph depicting product tests over a 2 week period. The Y axis are the results ranging from -10 to +10. The X axis is timescale. The problem I have is that the timescale only allows days, months and years. What I actually need is the x axis to breakdown into hours as multiple tests take place each hour. Is there any way that such can be accomplished in Excel? Regards Daz Use an XY chart, not what is confusing called a line chart. You can then set the X axis increment in Excel's time format. -- David Biddulph "news.microsoft.com" <Post2Group@Only....

CSplitterWnd questions
I would like to integrate a CSplitterWnd into my existing application. I have a window derived from CFormView containing two CListCtrl objects. I would like to place a CSplitterWnd horizontally between the two CListCtrl objects. All of the samples I can find for CSplitterWnd show the splitter being placed in a CMainFrame. Is there any way to place the CSplitterWnd in a CFormView? What would I have to change to get a CSplitterWnd between the two CListCtrl's on a CFormView? Thank you. CSplitterWnd wasn't designed for that. Take a look at these instead: http://www.codeproje...

Quick Time
I have windows xp sp2,and want to know if I need Quick Time. Apparently it is not working correctly which it keeps reminding me, usually when I am on face book. So do I uninstall it and redo it or not? Thanks http://discussions.apple.com/forum.jspa?forumID=943 "didee58" <didee58@discussions.microsoft.com> wrote in message news:9E82461A-8192-407C-BAC7-10455759D56B@microsoft.com... :I have windows xp sp2,and want to know if I need Quick Time. Apparently it is : not working correctly which it keeps reminding me, usually when I am on face : book. So do I uninstal...

VB.NET Graphics Help
I want to learn how I can open a .x file, move it, rotate it, color it and pan it around on the screen I am having trouble finding any examples, if anyone knows please share this infromation with me... Thanks Jeff "Jeff" <offload@verizon.net> wrote in message news:%23wNkclofKHA.4592@TK2MSFTNGP06.phx.gbl... >I want to learn how I can open a .x file, move it, rotate it, color it and >pan it around on the screen > > I am having trouble finding any examples, if anyone knows please share > this infromation with me... > > > Th...

dash delivery question
We are currently working on migrating from qmail to exchange for internal office deliveries. with qmail(and sendmail only the dash is a plus) a user can use an email address of the form user-foo@domain.com where the user can use anything after the dash without having to get an alias setup by the admin. i can't find any options for this in exchange. is this type of setup possible? Would have to write a transport event sink... perhaps modify the one in kba 324021. -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "Ch...