+ Reply to Thread
Results 1 to 8 of 8

Why variable do not move in my formula

  1. #1
    Registered User
    Join Date
    02-21-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    27

    Why variable do not move in my formula

    HI

    I have create an excel formula that I need to input data daily.

    Every day, I need to insert a line and input my new data.

    Below is my formula

    =IF(V159="Skip","Go",IF(P160>0,IF(COUNTIF(C60:D154,">"&H159+3),"Good"),IF(COUNTIF(C60:D154,"<"&H159-3),"Good")))


    The problem is that when I insert a line. Most of my variable will change according except C60:D154

    As you can see below

    V159 change to V160 = This is good

    C60:D154 do not change accordingly. How can I make it change accordingly ?? Why it is not changing when I insert a line ?

    =IF(V160="Skip","Go",IF(P161>0,IF(COUNTIF(C60:D154,">"&H160+3),"Good"),IF(COUNTIF(C60:D154,"<"&H160-3),"Good")))


    Hope someone can advise me.

    Thanks

    Ken Chua

  2. #2
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Why variable do not move in my formula

    Did you insert the line above C60? It works for me when I do that.
    1. Include a sample workbook with an example of the result you want
    2. Use [CODE] and [FORMULA] wrappers for your VBA code or excel formulas
    3. If your question has been answered, mark the thread as SOLVED and click on the "Add Rep" star to thank whoever helped you.

  3. #3
    Registered User
    Join Date
    02-21-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Why variable do not move in my formula

    I cannot understand. When I create the formula alone without any data. It work

    When I use it in my excel file....it fail...strange

  4. #4
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Why variable do not move in my formula

    That is strange. What if you copy your data to a new file?

  5. #5
    Registered User
    Join Date
    02-21-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Why variable do not move in my formula

    I try copy it in the new file but it cant work too.

    Is there problem with my data ?

    Kindly see attachement.

    I have the formular at column Z277

    =IF(Y277="Go","No Trade",IF(S278>0,IF(COUNTIF(F176:G268,">"&K277+3),"Good"),IF(COUNTIF(F176:G268,"<"&K277-3),"Good")))

    When I insert above Z277 with an empty line. F176:G268 do not change.

    Not sure why

    Can you help to use my file and see if you can insert and let the variable change at your side ?
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Why variable do not move in my formula

    If just inserted two rows up at row 1 and now it reads
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    02-21-2014
    Location
    Singapore
    MS-Off Ver
    Excel 2007
    Posts
    27

    Re: Why variable do not move in my formula

    HI Thank. I understand now. I must insert above F178 for it to change the variable.

  8. #8
    Valued Forum Contributor
    Join Date
    08-06-2013
    Location
    Detroit, Michigan
    MS-Off Ver
    Excel 2013
    Posts
    671

    Re: Why variable do not move in my formula

    Glad I could help Thanks for the +Rep!
    Last edited by k64; 06-07-2014 at 01:05 AM.

+ 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] many nested ifs, but need the formula to move with a variable
    By indu0720 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-12-2012, 12:04 PM
  2. [SOLVED] Move ActiveSheet to a different workbook (which has a variable name)
    By boarder236 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-03-2012, 05:17 PM
  3. Macro – If Equal to Variable, Copy and move to Next
    By melissadianna in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-12-2011, 02:50 PM
  4. Move Cells with Data Within Variable Range
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-18-2010, 05:03 AM
  5. Move sheet to another document with variable name
    By gmunro in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-27-2005, 06:06 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