+ Reply to Thread
Results 1 to 6 of 6

Formula Error When moving a column. Don't know how to fix the Formula

  1. #1
    Registered User
    Join Date
    10-25-2016
    Location
    Orlando,FL
    MS-Off Ver
    2003
    Posts
    3

    Formula Error When moving a column. Don't know how to fix the Formula

    I got this worksheet from a previous thread because the formulas as a whole are what i was looking for. However I need to move Column "D" QTY SOLD as Column A in "ORDER" sheet. In doing so all formulas in "INVOICE" sheet show errors. I have tried different ways to correct/change the formulas but to no avail. Can someone explain what i need to fix and how? or do it for me? I am so lost.

    the previous thread is here : http://www.excelforum.com/excel-form...in-values.html
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2505 (Windows 11 Home 24H2 64-bit)
    Posts
    91,234

    Re: Formula Error When moving a column. Don't know how to fix the Formula

    Part of your problem is that VLOOKUP works from left to right, so if you move the quantity column to A, you are going to have to completely rewrite the formulae. This is easy enough to do, but will require INDEX MATCH instead of VLOOKUP. You may also have to redefine the table.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Formula Error When moving a column. Don't know how to fix the Formula

    The VLOOKUP function can only return values from columns to the right of the lookup column.

    The INDEX- MATCH functions can do what you want.

    This will lookup the value in A4 in Order!B:B and return the value from Order!A:A
    =IF($A4="","",INDEX(Order!A:A,MATCH(Invoice!A4,Order!B:B,0)))
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  4. #4
    Registered User
    Join Date
    10-25-2016
    Location
    Orlando,FL
    MS-Off Ver
    2003
    Posts
    3

    Re: Formula Error When moving a column. Don't know how to fix the Formula

    the formulas are made so that once a QTY is entered in "ORDER" the entire row is copied over to "INVOICE". On both sheets I want the QTY to be in COLUMN A while still allowing the rows to be copied over. I can move QTY to column "A" in "INVOICE" without disrupting anything. If i move it in "ORDER" it disrupts all the formulas in all columns in "INVOICE".

    the INDEX didn't work

  5. #5
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,653

    Re: Formula Error When moving a column. Don't know how to fix the Formula

    See attached.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    10-25-2016
    Location
    Orlando,FL
    MS-Off Ver
    2003
    Posts
    3

    Re: Formula Error When moving a column. Don't know how to fix the Formula

    THANKS SO MUCH!!

+ 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. Formula for moving entire row once data in entered into a column
    By shantelcollins in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-20-2015, 07:35 PM
  2. Replies: 1
    Last Post: 10-20-2014, 03:20 PM
  3. Moving Cell contents with a formula, based on the column value?
    By bvandervyver44 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-13-2013, 02:51 AM
  4. [SOLVED] Error in macro when copying formula down column
    By newnoise in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2012, 08:08 AM
  5. Excel Formula Error when deleting a column
    By GlenChambers in forum Excel General
    Replies: 5
    Last Post: 12-11-2009, 05:17 PM
  6. Formula to sum every 4th cell returns #DIV/0! error in some column
    By Brent in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-16-2006, 03:25 PM
  7. moving the formula "average" over one column in a macro
    By drumstu in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 09-06-2005, 09: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