+ Reply to Thread
Results 1 to 6 of 6

Column needs to adjust value/text based on value in other cell.

  1. #1
    Registered User
    Join Date
    09-02-2015
    Location
    Antwerp, Belgium
    MS-Off Ver
    Office 2013
    Posts
    7

    Column needs to adjust value/text based on value in other cell.

    Hi there

    I'm trying to make our work a little easier by making some shortcuts.

    Now the problem:

    e.g.

    If cell B3 contains "VC" then cell H3 should have the value "401", and so on. (402, 403, 404, ...)
    If cell B3 contains "MKE" then cell H3 should have the value "35000", and so on. (35000, 35001, ...)

    All data is in one table, but H3 should start counting from the top if B3 changes.

    Making the IF funtcions is no problem, but I have no clue how to "reset" the counting.

    Right now, if I add a different value in B4 (other than B3) it should be changing to 35000 or 401 based on the text in B4.
    But it just keeps counting, so I end up with 402 or 35001.

    I'm at a loss.


    Help would be greatly appreciated.

    Greetings

    Krikemancer



    Attachment: Test.xlsx
    Last edited by Krikemancer; 09-02-2015 at 05:15 AM.

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

    Re: Column needs to adjust value/text based on value in other cell.

    Put this in H4:

    =IF(B4=B3,H3+1,IF(B4="MKE",35000,401))

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    09-02-2015
    Location
    Antwerp, Belgium
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Column needs to adjust value/text based on value in other cell.

    Thanks for the reply.

    Sadly it didn't work :/

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

    Re: Column needs to adjust value/text based on value in other cell.

    It did for me - see attached file.

    You probably need to use semicolons instead of commas in the formula.

    Hope this helps.

    Pete
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-02-2015
    Location
    Antwerp, Belgium
    MS-Off Ver
    Office 2013
    Posts
    7

    Re: Column needs to adjust value/text based on value in other cell.

    It does work now. I indeed missed the semicolons

    Thanks a lot!


    Krikemancer

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

    Re: Column needs to adjust value/text based on value in other cell.

    Right, I'm glad we sorted that out.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this 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

+ 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] Change text to values and adjust column location
    By Lonney in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-01-2014, 09:32 PM
  2. Automatically adjust column width to fit text? (Pivot)
    By ThomasCarter in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 03-28-2013, 08:19 AM
  3. [SOLVED] Excel wrapped text column auto adjust
    By oldskool in forum Excel General
    Replies: 1
    Last Post: 01-24-2013, 07:48 AM
  4. Replies: 3
    Last Post: 03-16-2012, 10:18 PM
  5. Replies: 4
    Last Post: 03-15-2012, 07:35 PM
  6. Adjust percent in one column so based on value of another column
    By doug0147 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-14-2011, 12:04 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