+ Reply to Thread
Results 1 to 2 of 2

Add Data & Formulas to Blank Cells/Rows

Hybrid View

mstark96 Add Data & Formulas to Blank... 03-11-2025, 12:24 PM
MSDols Re: Add Data & Formulas to... 03-13-2025, 07:08 AM
  1. #1
    Registered User
    Join Date
    01-27-2023
    Location
    Dallas, TX
    MS-Off Ver
    Office 365
    Posts
    11

    Add Data & Formulas to Blank Cells/Rows

    I have a sheet I work on every morning that is unique with its data and how much there is. What I would like to do, is have a VBA code that can loop through blanks cells/rows in my sheet and add a formula in those columns, then copy & paste basic info from the above row. With bonus points if you can also include code to format it in the first place from its original state. I've attached an example file of what it should look like and its original format to hopefully show what I'm trying to explain.

    The "unformatted" sheet is the technical original that I have after some basic formatting. What I will do from there is split up rows of SUM (Column AB) that match its corresponding CUSIP (Column J) and add borders to the net amounts (Column X). You can see what this looks like in the "PartialFormat" sheet. From there, I will manually add a sum formula then copy and paste the matching data to complete it which the "Finished" sheet will show. If you could get it to work from the PartialFormat sheet, that would be great as it's usually not much of an issue to do it myself. If you could get it to work from its raw state (Unformatted sheet) that would be greatly appreciated!



    To give more details on what is needed. As previously explained, after basic formatting and manual changes. I will get it like the "PartialFormat" sheet. I have heavily cut it down but on average it will have about 100-200 rows of data with more occasionally. What I would like is at its simplest, a VBA code that will take each blank row in the sheet after I partially format it, and add a SUMIFS formula (below or a better one if you know it) to column X. Then in that same blank row, add a "Y" to column AB, then copy & paste the Settlement Date & CUSIP (Column G & J) from the above row since they will also be unique. And have it Loop or check each row until it reaches the end of the data or row 499 as row 500+ I will put data that's used for conditional formatting.

    Formula: copy to clipboard
    =SUMIFS(X:X,AB:AB,"SUM",J:J,J2)


    BONUS: If you can get it to work from it's unformatted state, that would be incredible! What it would need to do is check for "SUM" entries in column AB. Then match them to their CUSIP's in column J and add a new blank row when the CUSIP changes. It would then take the same info and in column X. Create a thick outside border of those entries and the new blank row, and a double bottom border above the SUM or new blank row. (Final example in the "Finished" sheet of how it should work).

    If you need more details, I'll try my best to explain it further!
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    01-25-2025
    Location
    Presov, Slovakia
    MS-Off Ver
    2021
    Posts
    196

    Re: Add Data & Formulas to Blank Cells/Rows

    Hi mstark96,
    try it. The edit is started with the keyboard shortcut "Ctrl u"
    m.s.
    Attached Files Attached Files

+ 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. Replies: 4
    Last Post: 02-24-2017, 02:39 AM
  2. Replies: 11
    Last Post: 09-15-2014, 02:36 AM
  3. [SOLVED] Remove blank rows that aren't really blank (contain unused formulas)
    By painterartist in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-02-2014, 02:01 PM
  4. How can I make a macro ignore blank cells? - Blank Cells have formulas
    By mz1161 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2013, 08:54 AM
  5. find number of data in a range IGNORE FORMULAS, BLANK cells
    By ccsmith in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2013, 11:57 AM
  6. Replies: 6
    Last Post: 05-01-2012, 10:34 PM
  7. Replies: 0
    Last Post: 04-05-2012, 10:37 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