+ Reply to Thread
Results 1 to 6 of 6

Adding Text to Cell using VBA

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Adding Text to Cell using VBA

    I need help with adding text to row.

    I want First Name to Cell A4 and Last Name and Cell B4 through F4. How I could I build this? I would like to loop through 218 worksheets.

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Adding Text to Cell using VBA

    First you need an input method. Are you uploading this from a text file or do you want a prompt for you to input the info?

  3. #3
    Registered User
    Join Date
    10-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Adding Text to Cell using VBA

    I want the macro to run and automatically insert text in cell a4 -f4. Then loop for all sheets. Sorry I am new to all this.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Adding Text to Cell using VBA

    Where does the data come from?

  5. #5
    Registered User
    Join Date
    10-30-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Adding Text to Cell using VBA

    Sub text()
    Application.Worksheets("Sheet1").Range("A4") = "County"
    Application.Worksheets("Sheet1").Range("B4") = "name 3"
    Application.Worksheets("Sheet1").Range("C4") = "name 4"
    Application.Worksheets("Sheet1").Range("D4") = "nam A"
    Application.Worksheets("Sheet1").Range("E4") = "nam B"
    Application.Worksheets("Sheet1").Range("F4") = "nam C"
    End Sub


    I want this loop onto over 200 sheets

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Adding Text to Cell using VBA

    Something like this perhaps.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1