Results 1 to 4 of 4

Vlookup Looping through columns and rows returning sum in total column

Threaded View

  1. #1
    Registered User
    Join Date
    08-07-2013
    Location
    Monroeville, Pa
    MS-Off Ver
    Excel 2010
    Posts
    22

    Vlookup Looping through columns and rows returning sum in total column

    First, I would like to thank anyone who can possibly assist me with the VBA for this spreadsheet.

    The worksheet consists of 10 columns (A-J) and 13 rows (1-13). The first row is a header row that contains eight codes that I need to look up the value in a table and multiple it by the count in each of the cells below. The result of the vlookup for each column needs to be added together and return a total in column J. I have a formlua that works well, however, I would like to convert the formula to VBA and For Each loops confuse me every time. The formula is:

    =SUM(VLOOKUP(B$1,$P$2:$Q$9,2,FALSE)*B2,VLOOKUP(C$1,$P$2:$Q$9,2,FALSE)*C2,VLOOKUP(D$1,$P$2:$Q$9,2,FALSE)*D2,VLOOKUP(E$1,$P$2:$Q$9,2,FALSE)*E2,VLOOKUP(F$1,$P$2:$Q$9,2,FALSE)*F2,VLOOKUP(G$1,$P$2:$Q$9,2,FALSE)*G2,VLOOKUP(H$1,$P$2:$Q$9,2,FALSE)*H2,VLOOKUP(I$1,$P$2:$Q$9,2,FALSE)*I2)
    A sample workbook is attached.

    Any help is greatly appriciated.

    Thank you,
    Eric
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Looping through rows, finding 2 matching columns, returning the 3rd column as a variable
    By orionanomaly in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-27-2018, 09:36 AM
  2. Looping through rows then columns
    By shaggyjh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-10-2018, 05:31 AM
  3. [SOLVED] Checking column for values and returning a running total.
    By Anarza in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-11-2017, 05:53 AM
  4. [SOLVED] Vlookup column change. columns to rows
    By b19upj in forum Excel General
    Replies: 5
    Last Post: 04-06-2016, 11:16 AM
  5. Looping Through Columns And Rows
    By slimjm911 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-08-2012, 08:41 PM
  6. Replies: 4
    Last Post: 01-03-2012, 12:00 PM
  7. Looping through Columns then Rows
    By JCP in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2005, 12:27 AM

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