+ Reply to Thread
Results 1 to 5 of 5

VBA to automatically fill cell based on value in another cell

  1. #1
    Registered User
    Join Date
    02-04-2013
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2010
    Posts
    27

    VBA to automatically fill cell based on value in another cell

    Without using formulas in the actual cells, I need VBA to automatically fill column C with a letter A only if there is any kind of value (letters or numbers) in column B. I also need need column K to be populated with the number 1 only if there is any kind of value (letters or numbers) in column B.

    This will greatly help streamline an upload process. I am very new to VBA and I am struggling to get this to work.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: VBA to automatically fill cell based on value in another cell

    Hey,

    how about something like this? This macro should be run when the active sheet is the one you want to sort. Save a copy of the file before you run it!
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    02-04-2013
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: VBA to automatically fill cell based on value in another cell

    RHCPgergo, thanks for the quick reply! I forgot to tell you that row 1 has headings in it so start at row 2, but somehow you already knew that and compensated for it, well done! Worked great but I forgot to mention 1 thing if it can be added to this VBA.

    I also need Column L to equal whatever is in column F only if there is data in column F, starting at row 2 and below again

    Than

  4. #4
    Valued Forum Contributor
    Join Date
    08-13-2012
    Location
    Gardony, Hungary
    MS-Off Ver
    Excel 2003
    Posts
    558

    Re: VBA to automatically fill cell based on value in another cell

    Here's the modified macro.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-04-2013
    Location
    Buffalo, New York
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: VBA to automatically fill cell based on value in another cell

    Worked great, awesome.

    I have another request for this worksheet but it's kind of different so I'll start another thread.

    Thanks again!

+ 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