Closed Thread
Results 1 to 14 of 14

Pasting formulas based on cell color: Formula? or Macro?

  1. #1
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Pasting formulas based on cell color: Formula? or Macro?

    Hello All
    I am working on a rather large spreadsheet (66 K Rows) and have attached an abbreviated version for this forums expertise

    Is it possible to paste a formula into a column based on a corresponding cell that is filled in with a color and text that resides in that cell OR just simply the text that resides in the cell?

    Hopefully I can explain this via the spreadsheet:

    I am looking to copy the formulas that reside in Cells F5 through AK5 into the corresponding column F cells that have text in column A

    Thanks in advance
    Ron
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-02-2014
    Location
    USA
    MS-Off Ver
    2016
    Posts
    1,222

    Re: Pasting formulas based on cell color: Formula? or Macro?

    You can apply a filter based on either cell color or contents, then paste what you want into the visible results of the filter.

    I am not completely clear on what you have vs what you want however. Can you describe in more detail what you want to accomplish?
    Ways to get help: Post clear questions, explain your overall goal, supply as much background as possible, respond to questions asked of you by those trying to help and post sample(s) files.

    "I am here to help, not do it for people" -Me

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Pasting formulas based on cell color: Formula? or Macro?

    1st, you could change your cumbersome (but very functional) SUM formula to this...
    =SUMIF($F$1:$AJ$1,"*total",F5:AJ5)

    2nd, what exactly is it that you want to sum? (in fact my suggested formula may already have answered your question?)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Hello Ford and ZeroCool

    Thanks for helping. Let's see if I cant communicate a bit better

    In the spreadsheet, you will notice different formulas in each cell from F5 to AK5. These are necessary due to the insurances I have to work with and how I need to report these out.

    What I am trying to do is this

    Cell A11 has text inserted( name ). I need my formulas from F5, G5, H5 etc to show up in every corresponding column F11, G11, H11 etc, F16,G16,H16 and so on) that has text in Column A. I started to do this manually as you can see, but there is no way I can do this for 60K rows of data , so I was hoping there was a formula, format, macro , anything to help with this nightmare ( ha ha)

    Thanks so much
    Ron

  5. #5
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Hello Ford and ZeroCool

    Thanks for helping. Let's see if I cant communicate a bit better

    In the spreadsheet, you will notice different formulas in each cell from F5 to AK5. These are necessary due to the insurances I have to work with and how I need to report these out.

    What I am trying to do is this

    Cell A11 has text inserted( name ). I need my formulas from F5, G5, H5 etc to show up in every corresponding column F11, G11, H11 etc, F16,G16,H16 and so on) that has text in Column A. I started to do this manually as you can see, but there is no way I can do this for 60K rows of data , so I was hoping there was a formula, format, macro , anything to help with this nightmare ( ha ha)

    Thanks so much
    Ron

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Seeing as you have data entered in the intervening rows, I cannot think of any way to mass-copy row 5 down the way you want it, other than running a macro.

    Im sure 1 of the VBA experts here will give a FAR better solution to this, but you could record a macro to do the copy for you, then just keep repeating it? (still not that much different from the manual copy/paste )

  7. #7
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Thank you Ford !

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Pasting formulas based on cell color: Formula? or Macro?

    I didnt really help much, but thanks for the feedback. I will see if I can get someone else to assist with the VBA

  9. #9
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Pasting formulas based on cell color: Formula? or Macro?

    I appreciate your time Ford ! Someone was able to help with a Macro, but it wont seem to work when I copy and paste the correct names in Column A..Hopefully we can get there

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Yes I saw that. You should really stick with the same thread, rather than post duplicate threads

    Lets continue on your other thread now.

  11. #11
    Forum Contributor
    Join Date
    01-28-2013
    Location
    Spencerport, NY
    MS-Off Ver
    Excel 2016
    Posts
    270

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Sorry about that ! I just assumed I should start another thread in the Macro Section. My apologies

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Pasting formulas based on cell color: Formula? or Macro?

    No problem, just keep that in mind for future reference

  13. #13
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Try this:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Pasting formulas based on cell color: Formula? or Macro?

    Orin, can you post your code here please?
    https://www.excelforum.com/excel-pro...as-please.html

    Same question, but I am going to close this 1 so OP can continue on the other 1

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macro to change cell text color based on darkness of cell fill color
    By cincyshirm61 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-25-2014, 12:11 PM
  2. need macro make color filter based on given color in cell
    By nareshkt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-06-2014, 04:48 PM
  3. VBA / Macro help needed to change the barchart color based on Cell Color
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2012, 09:15 AM
  4. Excel formulas based on color of cell
    By gthemerc in forum Excel General
    Replies: 3
    Last Post: 03-02-2012, 02:34 PM
  5. Excel 2007 : Formulas based on cell color
    By Jhawth in forum Excel General
    Replies: 4
    Last Post: 04-05-2011, 03:07 PM
  6. Excel formulas based upon the color shading of a cell?
    By DGBG in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-12-2005, 06:06 PM
  7. Locating data based on cell color & pasting to new sheet
    By riggsd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-10-2005, 04:23 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