+ Reply to Thread
Results 1 to 3 of 3

Macro that copies a formula to another sheet and copies data at same time

  1. #1
    Registered User
    Join Date
    05-25-2017
    Location
    Hernando, Florida
    MS-Off Ver
    2013
    Posts
    2

    Macro that copies a formula to another sheet and copies data at same time

    I have a workbook: Sheet 1 has a drop down menu allowing you to select an option that then fills Sheet 1 with the information from Sheet 2 that pertains to the selection. I use a macro to copy this information and paste it to another location in Sheet 1 to be called upon by sheet 3 for some other calcs.

    The issue I have is I want the same macro to take a formula in Sheet 2 and copy and paste that formula into Sheet 3 but that formula will be in a different row and will need to correspond to the selection of the drop down in Sheet 1. I am pretty much a total newbie when it comes to VBA and have been using "Record Macro" to do things I need done. This however isn't working as it will not seek out the correct formula based on the selection.

    Any help would be much appreciated!
    Thanks in advance!

    Edit: It could be a 2cd macro if it needs to be.
    Last edited by Newbienewbster0932; 05-25-2017 at 09:51 PM.

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,910

    Re: Macro that copies a formula to another sheet and copies data at same time

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    05-25-2017
    Location
    Hernando, Florida
    MS-Off Ver
    2013
    Posts
    2

    Re: Macro that copies a formula to another sheet and copies data at same time

    Turns out I was over complicating the issue. A simple formula =IF(('Data formulation'!$A$3>0),VLOOKUP('Data formulation'!$A$3,Options!$A$2:$H$6,8),0)+($B$9)+($B$10) was able to be used instead of a complicated macro/VBA.

    This goes to show one should not Excel while overtired.

+ 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. Macro that selects a range of data from one sheet and copies to another
    By htiek960 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-04-2016, 02:49 AM
  2. Macro that copies sheet and places after the copied sheet every time
    By goatie43 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-08-2015, 10:27 AM
  3. Macro that copies data from one sheet and pastes it to another x columns to the right
    By Stevebarnes in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-30-2013, 12:26 PM
  4. Macro that copies formula from one sheet to another ONLY if the cell is blank
    By jbench18 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-13-2013, 05:33 PM
  5. Replies: 8
    Last Post: 01-26-2013, 12:25 AM
  6. Replies: 2
    Last Post: 11-12-2009, 07:18 PM
  7. Formula Function that copies data from one sheet to another
    By pcboy123 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-07-2006, 01:56 PM

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