+ Reply to Thread
Results 1 to 9 of 9

increase value by 1 if meets variable..

Hybrid View

  1. #1
    Registered User
    Join Date
    01-22-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    increase value by 1 if meets variable..

    okay so trying to create a reference log, and when criteria is met (less than 0) I want it to show in another column, Cas1, Cas2 so on and so on.. my problem is getting the number to only increase when criteria is met (less than zero) this is what I have...

    =IF(Q5>=0,"",((LEFT($D$1,3))&A1) &A1 is grabbing a 1 from a cell to add to Cas

    so for example Q3 has -3 so will show Cas1 Q4 and Q5 are more than zero so wont show a reference, then Q6 is less than zero. how do I get it to lookup the last highest Cas# value and add 1 each time
    Last edited by Dxmiian; 01-22-2020 at 05:05 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: increase value by 1 if meets variable..

    I presume from your formula that you have the letters Cas in cell D1, but you don't say which column the formula is in - I've assumed that it starts in cell R3, and that R2 does not contain text which starts with those 3 letters (though see later if it does). Put this formula in R3:

    =IF(Q3>=0,"",LEFT($D$1,3)&COUNTIF(R$2:R2,$D$1&"*")+1)

    and then you can copy this down as required.

    If R2 does contain text which begins with the 3 letters in D1 (like "Case Studies"), then you can just omit the +1 (shown in red) from the formula, and then copy it down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    01-22-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: increase value by 1 if meets variable..

    This is perfect, Thanks for your help.

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: increase value by 1 if meets variable..

    Good to hear that.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  5. #5
    Registered User
    Join Date
    01-22-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: increase value by 1 if meets variable..

    all done, thanks again.

  6. #6
    Registered User
    Join Date
    01-22-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: increase value by 1 if meets variable..

    Hi again,

    sorry but ive opened up the file again and its no longer working..

    =IF(Q4>=0,"",LEFT($D$1,3)&COUNTIF(A$3:A3,$D$1&"*")+1)

    this is what I have in A4 and have pasted it down.. A3 is just a title saying "references" now its not counting up like it was before.

  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: increase value by 1 if meets variable..

    It would help if you attached a sample Excel workbook.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Don't try to use the Paperclip icon, as it doesn't work on this forum.

    Hope this helps.

    Pete

  8. #8
    Registered User
    Join Date
    01-22-2020
    Location
    England
    MS-Off Ver
    2007
    Posts
    15

    Re: increase value by 1 if meets variable..

    Hi, sorry. just had my break, come back and realised I changed the wording in D1 from Cas and extended the word. still thinking it would only take the first 3 letters.. now ive put it back its working again.. sorry for the trouble. ill mark as finished again.

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: increase value by 1 if meets variable..

    Okay, thanks for feeding back.

    Pete

+ 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] Amortization Schedule - variable interest rates additional draws to increase principal
    By jessicaflyway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2016, 09:48 AM
  2. increase the font size of a variable in the body of email
    By NeoDasari in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2015, 05:11 PM
  3. Loop, if found, increase range variable.
    By NewGuy OnBlock in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-18-2015, 05:46 PM
  4. Variable Increase formula help
    By wilfred in forum Excel General
    Replies: 3
    Last Post: 08-28-2011, 05:42 PM
  5. Variable for automatic increase
    By thparian in forum Excel General
    Replies: 5
    Last Post: 05-03-2009, 06:50 AM
  6. [SOLVED] Increase/Decrease Value of variable/cell using scroll bar?
    By gixasixa@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2006, 11:50 PM
  7. How to increase a variable after checking of cell is filled up or not?
    By wuming79 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-05-2006, 05:00 AM

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