+ Reply to Thread
Results 1 to 9 of 9

If Then Formula

  1. #1
    Registered User
    Join Date
    11-06-2008
    Location
    Syracuse, NY
    Posts
    29

    If Then Formula

    I am trying to create an If Then formula to create a table. What I do is dump data from a website into Excel (see attachment) into columns A and B. I have set up a table so that if certain data is in column B then a name will appear in Column C.

    So what I would like to do is create an If Then formula saying, If a certain name in Column C appears then the transaction amount would go in one cell and the value date would go in another.

    I would like to have a worksheet for each name in that is in column C. I have 35 possibilities that could show up. If that name shows up in column C then I would like that transaction amount in one cell and the value date in another cell.

    So if a certain name shows up in column C then 6 cells above it in column A would be the value date.

    And then in another cell, if a certain name shows up in column C then 3 cells above it in column A would be the transaction amount.

    Is a formula like this possible?
    Attached Files Attached Files
    Last edited by VBA Noob; 11-06-2008 at 05:07 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached.

    I create a sheet for the first one, VEAM

    Formula in A3:

    Please Login or Register  to view this content.
    Formula in B3:

    Please Login or Register  to view this content.
    Both formulas are confirmed with CTRL+SHIFT+ENTER not just ENTER.

    Then copy them down as far as you want

    You can then make copies of this sheet and just change the reference in B1 to the appropriate Center.

    I changed the Second center in the main sheet to VEAM for test... you can change it back if it was real.

    Btw: What happened to your other username?
    Attached Files Attached Files
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    11-06-2008
    Location
    Syracuse, NY
    Posts
    29
    I am having some trouble taking the formulas you created and implementing them into my sheet.

    The worksheet my data is in is named: Nov Data

    I have data down to line 1043.

    So would not the formula look like the following:

    =IF(ROWS($B$1:$B1)>COUNTIF(NOV Data!$C$2:$C$1043,$B$1),"",INDEX(NOV Data!$B$2:$B$1043,SMALL(IF(NOV Data!$C$2:$C$1043=$B$1,ROW(NOV Data!$B$2:$B$1043)-3-ROW(NOV Data!$B$2)+1),ROWS($B$1:$B1))))

    When I enter the above and click CTRL+SHIFT+ENTER I get a pop up box that says: Update Values: Data

    What am I doing incorrectly?

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Since you have a space in the Sheetnames, you need to surround the sheetname with single quotes at each occurrence

    e.g. 'Nov Data'!

  5. #5
    Registered User
    Join Date
    11-06-2008
    Location
    Syracuse, NY
    Posts
    29
    Still not getting this formula to work. Does it matter that I have formulas in Column C as opposed to the Centers name typed in?

    Attached is the sheet I actually use, with the formulas I had in place before you started helping me.

    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Your column F in NOVDATA had an extra space in front of the VEAM entries... please clean them all.

    The #N/A is causing an issue to...

    You can get rid of them.. or if you want to keep them change the formulas in A3 and B3 of VEAM sheet to:

    Please Login or Register  to view this content.
    and

    Please Login or Register  to view this content.
    both confirmed with CSE and copied down
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    11-06-2008
    Location
    Syracuse, NY
    Posts
    29

    Thumbs up

    THANK YOU THANK YOU THANK YOU!

    Finally got it to work.

    Again, Thank you for your patience and help.

  8. #8
    Registered User
    Join Date
    09-20-2011
    Location
    Blowing Rock, NC
    MS-Off Ver
    Excel 2003
    Posts
    1

    If Then Formula-2010 Excel

    Trying to create "If then" formula for several Item Codes and Description:
    ie. If A-003 item code then Alcolec S automatically displays as description? Help?

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: If Then Formula

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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