+ Reply to Thread
Results 1 to 6 of 6

Data selection issue

  1. #1
    Registered User
    Join Date
    04-20-2016
    Location
    Nairobi
    MS-Off Ver
    2010
    Posts
    2

    Angry Data selection issue

    I need urgent help. I have a daily precipitation data for over 20 years. I need to choose from this data wet day that follows dry days. For instance,
    0, 0, 2.3, 3.0, 0.0, 1.5, 0.0, 1.2, 3.2, 3.6, 0.0, 0.0, 1.0.
    Now wet days that follows dry days are 2.3, 1.5, 1.2 & 1.0. These are supposed to be selected from a column with thousands of records (cells). Kindly assist.

    Dickens Odeny,
    Nairobi, Kenya

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Data selection issue

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window (or use the paperclip icon).
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-20-2016
    Location
    Nairobi
    MS-Off Ver
    2010
    Posts
    2

    Re: Data selection issue

    Find attached data for demonstration.
    Attached Files Attached Files

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2404 Win 11 Home 64 Bit
    Posts
    23,872

    Re: Data selection issue

    Here is a VBA solution.

    Please Login or Register  to view this content.


    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button

  5. #5
    Registered User
    Join Date
    04-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Data selection issue

    Try this in column B
    =IF(AND(A1=0,A2>0),"Wet after dry","")
    and then filter column B for the text "Wet After Dry"

  6. #6
    Registered User
    Join Date
    04-23-2012
    Location
    Ireland
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Data selection issue

    Amended spreadsheet attached
    Attached Files Attached Files

+ 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. Issue with a selection into an array.
    By starlev in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2015, 08:21 AM
  2. Replies: 3
    Last Post: 07-31-2013, 11:53 AM
  3. [SOLVED] MSXML2 Nodes Selection Issue
    By AKarel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-08-2013, 04:07 PM
  4. Excel 2007 : Excel Selection issue
    By anyjburnett in forum Excel General
    Replies: 3
    Last Post: 04-26-2012, 11:19 AM
  5. [SOLVED] Selection.formula = issue
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-19-2012, 08:34 PM
  6. Cell selection issue
    By MsfStl in forum Excel General
    Replies: 6
    Last Post: 09-02-2008, 03:16 PM
  7. Issue clearing previous selection
    By nmutimer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-25-2006, 08:31 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