+ Reply to Thread
Results 1 to 3 of 3

How to count back 4 weeks, skipping blank cells

  1. #1
    Registered User
    Join Date
    02-07-2014
    Location
    Washington
    MS-Off Ver
    Excel 2013
    Posts
    1

    How to count back 4 weeks, skipping blank cells

    I am using excel to analyze stock changes. Yahoo spits out a column with dates and another with closing prices but occasionally inserts a row showing a dividend, something like this:
    Date Closing price
    12/30/13 120
    12/23/13 118
    12/16/13 119
    12/9/13 117
    12/2/13 115
    11/25/13 116
    11/22/13 dividend 0.23
    11/18/25 116
    11/11/13 115

    In the spreadsheet, column A is date and Column E is closing price, such that the cell in column E where the dividend is listed is blank.

    The problem- as I update data each week, the dividend row moves. How can I consistently figure price changes for 4 weeks and 13 weeks without getting messed up by the dividend row? Is there to auto delete the row or make the formula count down 4 cells in the price column, while skipping any cells without data?

    I am attaching a sample worksheet
    Thanks
    Attached Files Attached Files

  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: How to count back 4 weeks, skipping blank cells

    What's the actual operation you are trying to perform?

    Assuming the data lined up perfectly normal, what formula would you use to do what you intend to do?

    You can either use arrays with criteria that negate the blank rows, or you could use a simple procedure to delete the rows.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    02-07-2014
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: How to count back 4 weeks, skipping blank cells

    right click anywhere in the open price column (Column B in your example), choose sort/ largest to smallest, and the dividend lines move to the top of the table. Delete them and sort again, this time by right clicking any of the date cells, select the order and your table will be as you want it without the dividend lines. Or are you looking for something more automated?

+ 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: 0
    Last Post: 03-05-2013, 09:22 AM
  2. Skipping NOT blank cells (follow up, back to testing)
    By donyc in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-01-2012, 07:03 PM
  3. Skipping blank cells with IF function
    By warrickza in forum Excel General
    Replies: 8
    Last Post: 05-06-2010, 09:22 AM
  4. Concatenation and skipping blank cells
    By soma104 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-31-2006, 08:15 AM
  5. Skipping Blank Cells
    By Coltsfan in forum Excel General
    Replies: 1
    Last Post: 10-12-2005, 09:05 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