+ Reply to Thread
Results 1 to 6 of 6

Using Text as a dependent variable in excel

  1. #1
    Registered User
    Join Date
    06-05-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    14

    Using Text as a dependent variable in excel

    I've been trying to figure out a way to create a function that will not only consolidate data from any duplicate entries but also be dependant on the header of the row. I know that if I place a =sumif function into this table, I can get it to consolidate the duplicates but I'm having difficulty finding a way to also have it rely on the header. Is there an easier function to use or is there a function that I can place within the sumif to have it look at both fields? I'll attach screenshots to help explain what I mean.

    Capt 1.JPG

    so for example, this is the raw data and the highlighted cells are my headers. I want to make a function in a new table that will look at both the rows (A,B,C,D,A,H,E,D,C) and compine the duplicates but also look at the top (Samp 1, Samp 2, Samp 3) and adjust acordingly. Like if I were to replace Samp 3 with Samp 1, I would want the function to see that there are now two "Samp 1" and combine them.

    Thank you in advance!

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Using Text as a dependent variable in excel

    Hi,

    I think SUMPRODUCT is what you want but can you post a sample workbook showing what you have and what result you want?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    06-05-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    14

    Re: Using Text as a dependent variable in excel

    Capture.JPG

    So I want to have the function consolidate the data on the left side into the table on the right. But while doing so, I want it to check the column name and verify that it goes into the correct column. So for example if Column B moved to Column C, I want to have a function that'll see that and still make sure to place it into column H. I want to try and make it as automated as possible so someone could just dump data into it without having to format it.
    Attached Files Attached Files

  4. #4
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Using Text as a dependent variable in excel

    In H2, try

    =SUMPRODUCT(($B$2:$D$10)*($A$2:$A$10=$G2)*($B$1:$D$1=H$1))

  5. #5
    Registered User
    Join Date
    06-05-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    14

    Re: Using Text as a dependent variable in excel

    That worked flawlessly. Thank you so much!

  6. #6
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Using Text as a dependent variable in excel

    You're welcome. Glad to help!

+ 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. Standard Deviation dependent on variable
    By Hunter E. Hunt in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-27-2015, 03:21 AM
  2. Variable Dependent Drop Downs
    By aeroslinger in forum Excel General
    Replies: 5
    Last Post: 10-09-2014, 05:45 PM
  3. Replies: 4
    Last Post: 05-07-2014, 03:08 AM
  4. [SOLVED] Variable dependent equation
    By samuelabyrd in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-25-2013, 10:18 PM
  5. [SOLVED] Value dependent variable cell action
    By ZakQHogg in forum Excel General
    Replies: 2
    Last Post: 05-16-2012, 02:53 AM
  6. Dependent variable in Drop-Down List
    By excelhelp18 in forum Excel General
    Replies: 1
    Last Post: 03-30-2009, 06:58 AM
  7. Chart of time dependent variable
    By nasalcherry in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 01-20-2008, 01:30 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