+ Reply to Thread
Results 1 to 5 of 5

One to One Formula extract then one to many

Hybrid View

  1. #1
    Registered User
    Join Date
    10-21-2016
    Location
    Denver Co
    MS-Off Ver
    2013
    Posts
    65

    One to One Formula extract then one to many

    Need help with a macro that will per the [Operation] will or if the operation is the same
    1. Match amounts when added together = 0 (86, -86) and label them "1"In column AB
    2 Then If operation is the same and if there is not a "1" in Column AB sum all the other Amounts that may equal one to many For Example ( 1,078.55+ 9,670.00 = 10,748.55) and label "2 "in Column AB
    3. Highlight the Amount Cells Green if there is a 1 or 2 in Column AB


    Attach is example of data. I highlight 2 groups that add to zero and sum to zero once a test is run. There may be more that net to zero
    Attached Files Attached Files
    Last edited by GCLIFTON; 01-13-2017 at 06:00 PM.

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: One to One Formula extract then one to many

    Hi,

    In AB2 copied down
    Formula: copy to clipboard
    =IF(SUMIF($B$2:$B$668,B2,$E$2:$E$668)=0,1,2)


    Conditional format in E2
    Formula: copy to clipboard
    =AB2=1

    and applied to E2:E668
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    10-21-2016
    Location
    Denver Co
    MS-Off Ver
    2013
    Posts
    65

    Re: One to One Formula extract then one to many

    Just tried this and it did not hightlight or identify the 86 -86 And i was hoping this could be written in VBA because my master spreadsheet is 30,000 lines.

    So the first macro will run a similar equation stating when the operation is the same t match one for one like 86.00 and -86.00 and mark it with a 1 in column AB and highlight the amount green
    then
    A second macro will run and state in same operation exclude the data that is marked with a 1 in AB and sum all other data that total to zero and mark the amount green and with a "2" in AB as well

    So at then end when the macro finishes i can sort by column AB by 1 and 2 and i should have all data that ties to zero or i can filter by the amount column by Green and find all that net to zero as well

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: One to One Formula extract then one to many

    Hi,

    I dont know what you mean by 86-86.

    Maybe this modification to AB2 copied down is what you want
    Formula: copy to clipboard
    =IF(SUMIF($B$2:$B$668,B2,$E$2:$E$668)=0,1,IF(ISERROR(MATCH(-E2,$E$2:$E$668,FALSE)),"",2))


    See attached.

    A macro won't be any quicker than a standard Excel formula such as this.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-21-2016
    Location
    Denver Co
    MS-Off Ver
    2013
    Posts
    65

    Re: One to One Formula extract then one to many

    Ok i can agree with that statement . With that being said, we are 90% there. When you filter by AB the "1" it does show all the things that match one to one. And when you filter by "2" there is a 720.86 variance It grabs a lot but it seems to grab operation that may have only had one value so it came thru and other things as well. Is there a way to not have those come thru. For example i highlighted some. Is there a way to make those not come thru and that will be that 10%
    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. [SOLVED] extract amounts from formula
    By k1dr0ck in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-16-2016, 06:17 AM
  2. [SOLVED] Formula to extract strings
    By sharathnarayanan in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 11-13-2015, 03:53 AM
  3. [SOLVED] Need help with text extract formula
    By SEMMatt in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-09-2014, 07:52 PM
  4. [SOLVED] Extract Year for Other Formula
    By Publicpenguin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-05-2014, 07:29 PM
  5. Formula to extract text
    By nobodyukno in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-14-2014, 08:48 AM
  6. Extract formula text
    By blachloch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-11-2012, 04:14 PM
  7. Extract formula from Text box
    By CLR in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 02-08-2005, 11: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