+ Reply to Thread
Results 1 to 4 of 4

VBA Macro to autofill data in column based on value on adjacent cell

  1. #1
    Registered User
    Join Date
    08-13-2013
    Location
    salt lake city, ut
    MS-Off Ver
    Excel 2003
    Posts
    3

    VBA Macro to autofill data in column based on value on adjacent cell

    I am not new to VBA but for some reason I can't seem to wrap my brain around this problem . I have a macro to clear out a sheet and prefill the info to ready it for the next month. So here is the basic concept: A1:A31 is the day of the month. B1:31 is either blank ("") or "Closed" for whether the branch is open or closed on a specific date (this is prefilled using formulas on the sheet). C1:C31 is the amount of money we made (GP) on that day (the employee fills in the amount). For the "Closed" days I want the macro to enter in a "0" in the corresponding cell in column "C".

    Should I do a loop or define each line to look in the adjacent cell and fill in the value?

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: VBA Macro to autofill data in column based on value on adjacent cell

    Something like this should suffice:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    08-13-2013
    Location
    salt lake city, ut
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: VBA Macro to autofill data in column based on value on adjacent cell

    Thanks that works. Darn brain lapse

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: VBA Macro to autofill data in column based on value on adjacent cell

    I don't even know a darned thing about VB. I came in looking for VB questions with potential formula solutions.

    Sometimes, I just get lucky.


+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Need help with Macro to autofill formula in Column B based on length of Column A
    By soxsrules in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-06-2013, 02:43 PM
  2. [SOLVED] Autofill cell underneath but only if adjacent cell in next column contains data
    By picton2000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2013, 07:36 AM
  3. [SOLVED] Macro to autofill formula down to length of adjacent column to the left
    By jacobadger in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-16-2012, 08:28 PM
  4. Autofill a column based on number in adjacent column
    By fbonetti in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-08-2011, 04:19 PM
  5. Macro to autofill a IF function based on the column before it
    By capnhud in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-16-2010, 11:58 AM

Tags for this Thread

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