+ Reply to Thread
Results 1 to 8 of 8

Combining IF, RANGE, DATE RANGE

  1. #1
    Registered User
    Join Date
    01-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Combining IF, RANGE, DATE RANGE

    Hi, I would like help with how to best compile a macro? (I don't think I can do this with formula?) :

    Look at a RANGE(A1:A100), if VALUE in range >0 & text string in B NOT EQUAL to "exceldummy" display list of values in C from RANGE & corresponding list of text strings from B

    Any help appreciated
    Last edited by Scamps; 01-27-2013 at 12:15 PM.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Combining IF, RANGE, DATE RANGE

    "display list of values in C from RANGE & corresponding list of text strings from B"
    How are these values and texts displayed in column C? Please attach a sample. Go to advance- half way the page, you see attachment

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Combining IF, RANGE, DATE RANGE

    Hi, Scamps,

    have you tried looking at the Autofilter to fulfill what you are after?

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    01-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Combining IF, RANGE, DATE RANGE

    Hi, sorry for the delay & thanks for the replies. HaHoBe auto filter is no use for what I am trying to achieve.

    Basically I have a spreadsheet full of income & expenditure data which covers the financial year. I want to be able to pull reports out of it for specified time periods which will display in a pretty printable statement. The income is pretty easy since I can use a SUMIF for the date range selected as it's a static string. However, the expenditures are very random. I can filter the columns to view the data within the date range but I want to automate these reports by summing all data items with the same string in 1 column of the report & fill the adjacent column with the text value of the string. Hope this makes more sense.

  5. #5
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Combining IF, RANGE, DATE RANGE

    Hi, Scamps,

    from I what I read you could use both fiters or a Pivot to deliver the results. Using only VBA you could use Arrays or Collections/Dictionaries. I´m not so sure how you want to work on these summaries which sort of makes it hard to decide how to perform and what to use. Maybe you could attach a workbook with an example of data bits (close to your original data) and the wanted result and tell us if it´s a hundred rows or tenthousands.

    Ciao,
    Holger

  6. #6
    Registered User
    Join Date
    01-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Combining IF, RANGE, DATE RANGE

    Hi, I have attached an example so you can see what I am trying to achieve. The range array will be maybe 200 rows.
    Attached Files Attached Files

  7. #7
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Combining IF, RANGE, DATE RANGE

    Hi, Samps,

    completed the formulas as requested and put in a Pivot Table as well, please have a look at the attached workbook. I would recommend to convert the ranges for the formulas to dynamic ones according to Update Charts Automatically When You Enter New Data.

    Ciao,
    Holger
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-19-2013
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Combining IF, RANGE, DATE RANGE

    Thanks for your help HaHoBe, this solves my problem

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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