+ Reply to Thread
Results 1 to 2 of 2

Code to copy formula down collumn

Hybrid View

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    Christchurch New Zealand
    MS-Off Ver
    Excel 2013
    Posts
    45

    Code to copy formula down collumn

    Hi

    I need some VBA code to copy a simple formula down a column when the corresponding cell has a number in it
    I don’t want to drag down the formula as it creates a flat line on my graph.
    Formula is =D2+B3 and is relative
    Please see attached sheet to see what I am trying to achieve

    Thanks for you help
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,941

    Re: Code to copy formula down collumn

    Non'VBA solution:
    In D3:
    =(D2+B3)*(B3<>"")
    will show 0 if B3 is blank; however,
    =IF(B3<>"",D2+B3,"")
    will show blank if B3 is blank

    Copied down as usual.
    Ben Van Johnson

+ 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. Formula which will collate names into a collumn
    By rodduz in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 09-19-2014, 06:23 AM
  2. Macro to copy simple Sum down the collumn
    By bouncingbudha in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2014, 05:11 PM
  3. [SOLVED] Find a collumn in a dynamic sheet and select the entire collumn
    By Armand0 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-03-2014, 11:20 AM
  4. reading a name from collumn in a formula
    By sqoo in forum Excel General
    Replies: 2
    Last Post: 04-30-2011, 02:11 PM
  5. Macro to Copy One Collumn to the Next
    By JohnOB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-08-2006, 09:58 AM

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