+ Reply to Thread
Results 1 to 3 of 3

Assign String Value Based On Criteria

  1. #1
    Registered User
    Join Date
    05-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Assign String Value Based On Criteria

    Hey guys,

    Not sure if my title actually explains what I'm trying to do. I have some data where column A is a time grouped by hour and column B is the country of origin. Unfortunately over half of the entries in the country column have a origin of "None". I know the percentage of entries for say the US at 6 AM - lets call it 6%. What I'd like to do is randomly assign 6% of the 6 AM entries of "None" to read US instead.

    I've attached a little of the raw data I'm working with.Excel Sample.xlsx

    Thank you in advance.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Assign String Value Based On Criteria

    Something like this?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-13-2011
    Location
    San Francisco, CA
    MS-Off Ver
    Excel 2007
    Posts
    23

    Re: Assign String Value Based On Criteria

    Perhaps. Could you explain what the second formula is where you are assigning country codes?

    I want to be able to assign 6% of the "None" countries in the 6 am hour to be the "US". And so on for each hour and country.

+ 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] Copy and paste row from different tab based on 2 different criteria, assign to button
    By AndrewL in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2014, 12:55 AM
  2. [SOLVED] Function to concatenate string based on a integer criteria
    By Tremper in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-19-2013, 10:03 AM
  3. Replies: 3
    Last Post: 04-23-2013, 03:46 PM
  4. How to Assign Value to a String & Replace String With Assigned Value?
    By xiaokang1982 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-23-2012, 06:01 PM
  5. Assign value to a string based on its position in a list
    By RobynC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2008, 05:15 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