+ Reply to Thread
Results 1 to 6 of 6

Creating new variables in Excel (newbie)

  1. #1
    Registered User
    Join Date
    05-03-2021
    Location
    Minnesota, USA
    MS-Off Ver
    Microsoft Office 2019
    Posts
    2

    Question Creating new variables in Excel (newbie)

    Hello, I have been tasked to perform the following in Excel:

    • Create a numeric variable that counts the total seasons of purchase through Spring 07.
    • Create a variable that indicates whether customer is a multichannel buyer or not
    • Create a variable that indicates whether or not the customer has gift dollars or not

    I am fairly new to Excel, so this is quite challenging for me. Any help would be greatly appreciated.
    Attached Files Attached Files
    Last edited by dtimm13; 05-03-2021 at 09:34 PM. Reason: Sample workbook link

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Creating new variables in Excel (newbie)

    I’m not sure about your post title, but I’m not sure it follows with the form rules such as rule #1, however that will be up to a moderator or admin to decide.

    Perhaps you noticed the yellow banner at the top of the post, if you upload a sample workbook of the data it doesn’t have to be all of it with expected results you can probably get more help.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Registered User
    Join Date
    05-03-2021
    Location
    Minnesota, USA
    MS-Off Ver
    Microsoft Office 2019
    Posts
    2

    Re: Creating new variables in Excel (newbie)

    Updated, thank you.

  4. #4
    Forum Contributor
    Join Date
    05-03-2021
    Location
    Nashville
    MS-Off Ver
    MS Office 365
    Posts
    189

    Re: Creating new variables in Excel (newbie)

    without the workbook, it's hard to tell exactly what you want.
    But for the first one
    Countif / Countifs can count purchases in "spring 07" depending if you want to narrow it down with another variable or not.. if you are only counting "Spring 07"
    =Countif(G:G,G2) - G:G is referencing only one column the "G2" is referencing the number of times that name comes up in that column.
    =Countifs(G:G,G2,E:E,E2) - This narrows it down to counting the number of times a text comes up in G:G and the number of times a Text comes up in E:E

    If the column is a "true/false" for "multichannel buyer a simple if statement like =if(G1="Multichannel",TRUE,FALSE) if the column header is "Multichannel" and the column is filled with Y's and N's Then =if(G1="Y",TRUE,FALSE).

    Same with gift dollars. you can use the same if statement =if(G1="gifted dollars",TRUE,FALSE)

    If you have a string like you posted above RetS07Dollars = 2007 Spring Retail Dollars
    You may need to do a "Find" formula to break out the variables into their own columns.
    In which case I would need to know all combinations of the possible "RetS07Dollars" (for example are they all the same character length, is it always in the same order, what does Summer look like and would "Fall" be RetF06Dollars? so many questions.

  5. #5
    Forum Contributor
    Join Date
    05-03-2021
    Location
    Nashville
    MS-Off Ver
    MS Office 365
    Posts
    189

    Re: Creating new variables in Excel (newbie)

    The workbook looks really simple.

    With the data you have given.
    in column H =SUM(C2,E2,G2) would give you all Spring 2007 sales totals (drag the formula down)

    Nothing tells me what a "multichannel" Customer is.. There is no formula with the data you have that tells Excel what a multichannel is...
    They all look like "Gifted Dollars" based on the headers.

    So you would in Column I Say "Yes" or True etc. for each ID.

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.96 for Mac MS 365
    Posts
    8,690

    Re: Creating new variables in Excel (newbie)

    there are a lot of questions I have for you.
    1) is this the way you are going to receive the data or is this the way you want to structure it?
    2) you note that 2004 through 2006 data will also be included, in the same columns with different headers separating them or in additional columns of their own?
    3) will the customer ID remain the same for additional periods and if the additional periods will be in additional columns will the customer by ID just have more columns (like fall 2007 retail in col B and Fall 2006 retain being in, for example col H of the same row for customer 22120)?
    4) what are your expected results for customer 22120 for example?

+ 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] Creating Dummy Variables using Excel
    By b0b020 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-11-2015, 09:23 AM
  2. [SOLVED] Creating a new excel workbook - newbie help!
    By sar2004 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2014, 12:55 PM
  3. Creating Venn diagrams in excel for 12 variables
    By cool_anu4u in forum Excel General
    Replies: 0
    Last Post: 03-07-2014, 09:22 AM
  4. Replies: 2
    Last Post: 08-28-2012, 05:55 AM
  5. Trouble defining variables in simple macro - newbie
    By poetstorm in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 03-21-2012, 11:52 PM
  6. Newbie, Variables not retained in sub?
    By NT_eyeballs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2006, 08:17 PM
  7. [SOLVED] newbie ?: set variables, different shts, equal to each other
    By terry b in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 02-28-2005, 06:06 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