+ Reply to Thread
Results 1 to 10 of 10

How to line up information in columns

  1. #1
    Registered User
    Join Date
    02-25-2020
    Location
    Gauteng, South Africa
    MS-Off Ver
    MS 2007
    Posts
    4

    How to line up information in columns

    Hi all,

    I need help aligning columns. So i have attached an example workbook for the scenario.

    On sheet1, i have all the items that we sell (Menu Item) in column A, the (Sales Category) in column B and the (Quantity Sold) in column C.

    On sheet2 and sheet3 i have sales from individual days that i want to line up with sheet1 so that i can calculate an average of what we sold. The thing is that on each day (sheet2 and sheet3) we dont always sell each item, so the items dont line up. I started copying and pasting and then manually moved rows down so that they line up. It didnt take me long to realise that it will take forever to do it that way, so here i am looking for assistance.

    Note that i do need all the columns to line up, so that i can see the Menu Item, Sales Category and Quantity Sold for each product. (example of what i need in sheet4)

    Calculating the average is the easy part for me, its the aligning of the 3 columns is what i need help with.

    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: How to line up information in columns

    I'm not entirely sure what you mean by "aligning the columns"... It's relatively easy using a vlookup function to find the sales for each day and pop them alongside the menu items, though,

    e.g. in G3 (a column for listing Sheet2 sales)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Have a look at the attachment - is that what you meant?

    Tim
    Attached Files Attached Files
    Last edited by harrisonland; 02-25-2020 at 06:19 PM. Reason: Missing attachment
    Never stop learning!
    <--- please consider *-ing !

  3. #3
    Registered User
    Join Date
    02-25-2020
    Location
    Gauteng, South Africa
    MS-Off Ver
    MS 2007
    Posts
    4

    Re: How to line up information in columns

    This is so much better than the way i wanted to do it.

    I have a question though. so if i type =VLOOKUP(A2,Sheet2!A2:C232,3,FALSE) for my first entry, i now want to copy that formula down for all 200 rows, but when i do that, it changes the Table Array for each row. i need it to change the lookup value as i go down each row so that it looks for the next product but it must always look at the same table array. Please help

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,398

    Re: How to line up information in columns

    You fix the array like this:

    =VLOOKUP(A2,Sheet2!$A$2:$C$232,3,FALSE)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    02-25-2020
    Location
    Gauteng, South Africa
    MS-Off Ver
    MS 2007
    Posts
    4

    Re: How to line up information in columns

    Sorted, dem $$$$ signs

  6. #6
    Registered User
    Join Date
    02-25-2020
    Location
    Gauteng, South Africa
    MS-Off Ver
    MS 2007
    Posts
    4

    Re: How to line up information in columns

    Awesome thanks,

    One last question, so now each lookup value that doesnt have a value ends up showing #N/A, how do i get it to replace that with 0

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,398

    Re: How to line up information in columns

    Like this:

    =IFNA(VLOOKUP(A2,Sheet2!$A$2:$C$232,3,FALSE),0)

    I am assuming you are not still using the very dated Excel 2007. If yu are, then this:

    =IF(ISNA(VLOOKUP(A2,Sheet2!$A$2:$C$232,3,FALSE)),0VLOOKUP(A2,Sheet2!$A$2:$C$232,3,FALSE))

    I have friends who live in Irene.

  8. #8
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: How to line up information in columns

    Haha! Looks like AliGW's got you sorted!

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,398

    Re: How to line up information in columns

    Sorry - I thought you were offline.

  10. #10
    Valued Forum Contributor
    Join Date
    06-22-2018
    Location
    Blackpool, England
    MS-Off Ver
    2019
    Posts
    408

    Re: How to line up information in columns

    I was! Good to see someone with far more experience than me saying what I would have said though.

+ 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] Using Information From Last Line
    By iwcef in forum Excel General
    Replies: 7
    Last Post: 09-25-2018, 02:49 PM
  2. [SOLVED] How would I include first line information in subtotal line?
    By LMunoz in forum Excel General
    Replies: 2
    Last Post: 06-08-2015, 05:53 PM
  3. Replies: 2
    Last Post: 12-26-2012, 05:10 AM
  4. Replies: 10
    Last Post: 09-27-2012, 03:59 PM
  5. How to display information in other columns with missing information
    By Derry in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-03-2011, 11:10 PM
  6. [SOLVED] counting line by line matches of 2 columns possible in excel ?
    By Medikto D in forum Excel General
    Replies: 3
    Last Post: 06-01-2006, 12:50 PM
  7. [SOLVED] How can I line up 2 columns with similar information?
    By Kathy in forum Excel General
    Replies: 3
    Last Post: 10-26-2005, 08: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