+ Reply to Thread
Results 1 to 10 of 10

Help with sorting values and formulas to different columns

  1. #1
    Registered User
    Join Date
    02-21-2017
    Location
    Kitchener, Ontario
    MS-Off Ver
    2007
    Posts
    5

    Cool Help with sorting values and formulas to different columns

    Good Afternoon,

    EG: If column n has a value of 1 - I want it placed in column P
    If column n has a value of 2- I want it placed in column Q

    There is a formula in column N - (=sum(m2+l2) I am not sure if this will make a difference to the writing of the formula.

    I have tried an if formula (if(N2=1, N2>2) but it is giving me an error.
    I am missing something.
    Thank you in advance for any help you may have.
    V

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,242

    Re: Help with sorting values and formulas to different columns

    in P2

    =IF(N2=1,1,"")

    In Q2

    =IF(N2=2,2,"")

  3. #3
    Registered User
    Join Date
    02-21-2017
    Location
    Kitchener, Ontario
    MS-Off Ver
    2007
    Posts
    5

    Re: Help with sorting values and formulas to different columns

    Sorry, I said there was a formula in N... that is not the case.

    N would only be a value of 1 or 2 as in Peter and Paul

    What I would like to do is have a formula that states that if Paul sold $100.00 total sales put it in column P but if Peter sold $100.00 put it in columm Q.
    My formula runs like this:

    Frame information - cost - retail - total profit (retail - cost) Lens information - cost - retail - total profit (retail - cost)- Salesperson (peter or paul) - Total profit (M2+L2)

    I am having trouble making the Salesperson responsible for the total profit.

    V

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,242

    Re: Help with sorting values and formulas to different columns

    Please attach a file (not image) so that respondents (a) do not have to type in data and (b) have data with which test any formulas. Ensure the data is representative of your actual "real world" data.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate.

    Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the (remove confidential) data.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.

  5. #5
    Registered User
    Join Date
    02-21-2017
    Location
    Kitchener, Ontario
    MS-Off Ver
    2007
    Posts
    5

    Re: Help with sorting values and formulas to different columns

    Thank you for your help... I am not seeing the attachment but I am hoping it worked.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,242

    Re: Help with sorting values and formulas to different columns

    Do you mean ....

    In P2

    =IF($N2=1,$M2,0) 1=Alison

    in Q2

    =IF($N2=2,$M2,0) 2=Tiffany

  7. #7
    Registered User
    Join Date
    02-21-2017
    Location
    Kitchener, Ontario
    MS-Off Ver
    2007
    Posts
    5

    Re: Help with sorting values and formulas to different columns

    This works... Thank you very much for your help!!!

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,242

    Re: Help with sorting values and formulas to different columns

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  9. #9
    Registered User
    Join Date
    02-21-2017
    Location
    Kitchener, Ontario
    MS-Off Ver
    2007
    Posts
    5

    Re: Help with sorting values and formulas to different columns

    This formula works, however in the column that does not coordinate with that value... it puts #Name?
    The formula transfers to the correct column (P) but in the (Q) column it puts the #Name?.
    I have to total the columns at the end of the month so would like opposite column to either be Nothing or 0
    Is there a way to have that value 0 instead of #Name?

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,242

    Re: Help with sorting values and formulas to different columns

    #NAME usually means something is a typo: check what is in Q as the formula for both is the same except for values of 1 & 2!

+ 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. Sorting multiple columns using formulas only
    By mm_crown in forum Excel General
    Replies: 10
    Last Post: 07-04-2019, 07:26 AM
  2. Sorting columns that are formulas
    By sperrysperry in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-21-2013, 03:06 PM
  3. [SOLVED] Sorting By Values...NOT Formulas
    By AntnyMI in forum Excel General
    Replies: 7
    Last Post: 03-25-2012, 02:07 PM
  4. sorting two columns and write the sorted values on two columns in a different sheet
    By virsojour in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-22-2010, 04:38 AM
  5. Sorting Columns with formulas
    By polaris6 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-09-2009, 12:06 PM
  6. Sorting values without moving formulas
    By Eckenrode in forum Excel General
    Replies: 0
    Last Post: 09-29-2008, 02:21 PM
  7. [SOLVED] is there a way to change formulas to values for sorting purposes?
    By Change formulas to values in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 AM
  8. sorting columns with formulas
    By still learning in forum Excel General
    Replies: 1
    Last Post: 06-01-2005, 05:05 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