+ Reply to Thread
Results 1 to 5 of 5

Please, advice a more elegant/correct approach to fill the column with values

  1. #1
    Forum Contributor
    Join Date
    05-20-2017
    Location
    Boston, US
    MS-Off Ver
    Mac 2011
    Posts
    139

    Please, advice a more elegant/correct approach to fill the column with values

    Hello!

    I have come up with a basic IF statement formula using OFFSETS to fill in values in the column.
    But as a beginner, I am sure that my approach is not elegant, and can be improved. Could you, please, suggest better ways to do the same thing?

    Short description, but it'll become clear once you see the example in the file.

    I have a beginning value. I need to fill the column with alternating values, which:

    - if the value above the current cell is negative, then add that negative value with the value in cell = current cell - 2;

    - if the value above the current cell is positive, then take 25% of that positive value.

    I came up with this formula: =IF(OFFSET(D7,-1,0)<0,OFFSET(D7,-2,0)+OFFSET(D7,-1,0),-OFFSET(D7,-1,0)*$B$1)

    Thank you very much!
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Please, advice a more elegant/correct approach to fill the column with values

    Hi,

    One way in D3 copied down

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Please, advice a more elegant/correct approach to fill the column with values

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  4. #4
    Forum Contributor
    Join Date
    05-20-2017
    Location
    Boston, US
    MS-Off Ver
    Mac 2011
    Posts
    139

    Re: Please, advice a more elegant/correct approach to fill the column with values

    Quote Originally Posted by Richard Buttrey View Post
    Hi,

    One way in D3 copied down

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Ah, indeed. ) Seems I got too enamored with the OFFSET function. Thank you.

  5. #5
    Forum Contributor
    Join Date
    05-20-2017
    Location
    Boston, US
    MS-Off Ver
    Mac 2011
    Posts
    139

    Re: Please, advice a more elegant/correct approach to fill the column with values

    Quote Originally Posted by mehmetcik View Post
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Yes, thank you. )

+ 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. [SOLVED] Advice on approach to a problem
    By SymphonyTomorrow in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2014, 01:18 PM
  2. [SOLVED] Nested IF fuction help. ? Correct approach
    By MadYowie in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-18-2013, 07:27 AM
  3. Moving data from form to collapsible table
    By nick2price in forum Excel General
    Replies: 1
    Last Post: 09-04-2013, 06:13 AM
  4. [SOLVED] Simplify: Copy Column Removing Non-Zero Values (formula approach)
    By Filibuster in forum Excel General
    Replies: 7
    Last Post: 05-30-2012, 11:16 AM
  5. Correct approach? (Multiple MID functions)
    By Harmony in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-31-2007, 04:17 AM
  6. [SOLVED] Advice on Approach to Convert List of Dates into a Calender format
    By Andibevan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-23-2005, 11:00 AM
  7. Deleting blank rows in a range or another fill approach
    By BigDave in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-03-2005, 11:05 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