• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Group and conditions in Excel VBA

coolkiran

Member
Hi All

I need some help on complex excel data.

Here is the scenarios:

I have excel data with 3 columns, (Id, Amount and Error Code). I will get 3 types of error code 1, 16 & blank. I have to go each error code and do the following things.

If Error Code 1:
I have to group Id and sum up the amount column,

if total value is positive , then i have to go each row in that group, wherever amount is negative i need to put remark as "Positive" and other row in that group as "OK".

If total Value is Negative, then i have each row in that group, wherever amount is negative i need to put remark as "Negative" and other row in that group as "OK".

If Error code is 16:

Need to check whether we have error code blank, if found.

Then i need to apply Vlookup formula from Error code 16 (ID) to Error Code Blank (ID). If any matches found , i need to goto Negative value in Error Code 16 and update as "Match".

I have attached working file.
 

Attachments

coolkiran
Is there any/some connection between 'Input' and 'Output'?
- Error Code 99
- some values from 'Output' comes ... somewhere?
- total value?
- Vlookup ... where in Your sample result?
I tried to compare something...
 

Attachments

coolkiran
If no clear answers then I cannot continue.
as ... Input and output both same sheet ...
so, why to send sample file which gives wrong image of layout?
I did four questions ...
okay, You wrote three sentences
but ... how many answers I got to my questions?
 
Back
Top