+ Reply to Thread
Results 1 to 3 of 3

VBA: calculate yield every 2 rows of 1 column in excel

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    39

    VBA: calculate yield every 2 rows of 1 column in excel

    Hello,

    I have a column with title and list of numbers. I need to calculate per every 2 rows the yield (i.e. 1st row - 2nd row) and write the result in first of both rows of next column.
    e.g. source data are in column A, and results go in column B. I write the results only every 2 rows, so I have every time 1 row empty. I'm looking to write VBA code for this exercise.

    Thank you for your help.

  2. #2
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: VBA: calculate yield every 2 rows of 1 column in excel

    Something like this perhaps.
    Attached Files Attached Files
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  3. #3
    Registered User
    Join Date
    02-13-2012
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    39

    Re: VBA: calculate yield every 2 rows of 1 column in excel

    Hello JapanDave,
    Thank you for your code suggestion. Your code works fine!
    Last edited by zeno1; 05-22-2012 at 12:29 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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