+ Reply to Thread
Results 1 to 17 of 17

2 Formulas to read items

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    2 Formulas to read items

    Hi,
    I have a question for specific formulas. I have attached an example below of my spreadsheet.
    I need a formula that would go into column F2, then autofill to the bottom. I need this formula to read Column B and E. If column B has 2 cash items at 0 days, column F3 would say cash+2 (F2 would be blank).

    Second formula would go into column G2 and autofill to the bottom as well. It would read column E and it would count up total number of items based on the descriptions from Column F.

    All the cells in between, I would prefer to have blank.
    Is this possible? Thank you for any help that could be provided.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    This is the formula for F2:

    =IF(AND(B2=B3;E2=E3);"";B2&"+"&E2)

    Maybe my semicolons should be commas for you.

    Working on the next formula
    When I say semicolon, u say comma!

  3. #3
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    This is for G2:

    =IF(F2="";"";COUNTIFS($B$2:B2;B2;$E$2:E2;E2))

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: 2 Formulas to read items

    You can do this with user defined functions.

    Please Login or Register  to view this content.
    Open the VBA editor by hitting Alt F11.
    Insert a new module with Insert - Module
    Paste in the above function
    Go back to the sheet by hitting Alt F11.

    In F2, enter = Category(B2,E2)


    In G2, enter = NumberOfItems(B2,E2)

    and copy down.

    Remember to save the workbook as a macro enabled workbook .xlsm
    Martin

  5. #5
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    Guys, thank you sooo much! I really appreciate your help!

  6. #6
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    hello L-Drr, for some reason this formula =IF(AND(B2=B3;E2=E3);"";B2&"+"&E2) is coming up with all blanks for all cells. Yes, I had to use commas. Any idea why that would be? Thank you.

  7. #7
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    Nope, no idea...
    Here's your file with my formula for column F (in column H), working correctly:
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    @L-Drr - I was wondering if you help me one more time with the formulas you created for this thread. Is is possible to tweak these formulas so they work when column A is filtered? For example, can you please take a look at the spreadsheet I attached? It shows the example. Thank you.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    Hi jericho,

    For as far as I understand, you can use the exact same formula...
    See attachment
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    The issue here is this - if I apply this formula to the unfiltered list (Row 2 through 20) and then filter column A to "th42", the formulas do not work.

  11. #11
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    what if you only select columns A through E and then sort by A?

  12. #12
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    That still does not work. If I do that, all NUmber of items should be at "1" except one item which should be at "2".
    Attached Files Attached Files

  13. #13
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    Works fine for me...
    Could you be more specific on what is going wrong? i.e. describe the wrong results that you are getting
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    Please take a look at column G on the spreadsheet you attached. G10, G14, G17, G18, and G18 have the wrong values. Thank you for all your help.

  15. #15
    Forum Contributor
    Join Date
    08-02-2013
    Location
    Wageningen, The Netherlands
    MS-Off Ver
    365
    Posts
    495

    Re: 2 Formulas to read items

    And what would be the right values, then? What is does now, is count the # of instances where the combination of B and E (in the same row) is also present in the rows above it.
    Maybe you want it to keep the values that it had before filtering? In that case you'd have do cut column G and paste back as values before filtering.

  16. #16
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    This is a specific report and the values need to be there after it is filtered. The report is so large that this porcess takes forever.

    I have attached a revised spreadsheet again.
    1. I noticed there is a flaw with the first formula in column F. The formula needs to take into account that the ID's change. For example, if ID th49 changes to ID50, cell F22 is blank. It shouldn't be.
    2. I think there needs to be a different formula in column P that also takes into account changing ID's.

    Does anyone know how to do this? Thank you
    Attached Files Attached Files

  17. #17
    Registered User
    Join Date
    09-10-2013
    Location
    Spain
    MS-Off Ver
    Excel 2010
    Posts
    57

    Re: 2 Formulas to read items

    Does anyone know how to do this? Thank you

+ 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] Read the top three items from a goods list
    By AndyGW in forum Excel General
    Replies: 11
    Last Post: 11-28-2012, 07:07 AM
  2. [SOLVED] Help! Formulas cannot be read by MS Excel 2002
    By Melissa Alex in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-22-2012, 04:24 AM
  3. Having Macro Read Values Not Formulas
    By somebody113 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2011, 08:42 PM
  4. Using ADO to read closed file does not read formulas
    By treyr in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-09-2010, 12:26 PM
  5. Need to read formulas
    By KimSingh in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-26-2005, 05:15 PM

Tags for this Thread

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