007_guy
02-20-2022, 09:56 PM
Hey guys, how are you?
I am trying to solve this tricky situation. I have two different TABS: OPERATIONS and DETAILS
OPERATION TAB has the following fields:
NUMBER
TYPE
DESCRIPTION
SUM_OF_MONEY
B0001100005429
FAC
SADADECO 19278294999
A0001100001230
REC
ORDONEZC9920 19299490733
B0001100005445
N/C
IGN_GONTAN 19266048459 19299490755
DETAILS TAB:
OPERATION_ID
AMOUNT
NUMBER
19278294999
4739
19299490733
9999
19266048459
34
19299490755
234
inside DESCRIPTION field there exist a 11-digit number which is the transaction number (i.e: 19278294999). DO NOTE that the same cell may contain more than one transaction (i.e: 19266048459 19299490755).
I want to achive this:
1) VBA SHOULD FIND EVERY TRANSACTION INSIDE "DESCRIPTION" CELL FROM TAB "OPERATIONS". IN THIS CASE THE FIRST ROW CONTAINS ONE TRANSACTION, ROW 2 CONTAINS ONE TRANSACTION AND ROW 3 CONTAINS 2 TRANSACTIONS
2) IT SHOULD COPY THE NUMBER FROM TAB "OPERATIONS" AND PASTE IT INSIDE COLUMN "NUMBER" FROM TAB "DESCRIPTION" (only do this if it is FAC or N/C) AND THEN, IT HAS TO DO THE SUMATORY IN TAB "OPERATIONS". TAKE A LOOK:
29431
Expected output:
29433
I have attached a xlsx file
29432
Can help me?
Thanks!
I am trying to solve this tricky situation. I have two different TABS: OPERATIONS and DETAILS
OPERATION TAB has the following fields:
NUMBER
TYPE
DESCRIPTION
SUM_OF_MONEY
B0001100005429
FAC
SADADECO 19278294999
A0001100001230
REC
ORDONEZC9920 19299490733
B0001100005445
N/C
IGN_GONTAN 19266048459 19299490755
DETAILS TAB:
OPERATION_ID
AMOUNT
NUMBER
19278294999
4739
19299490733
9999
19266048459
34
19299490755
234
inside DESCRIPTION field there exist a 11-digit number which is the transaction number (i.e: 19278294999). DO NOTE that the same cell may contain more than one transaction (i.e: 19266048459 19299490755).
I want to achive this:
1) VBA SHOULD FIND EVERY TRANSACTION INSIDE "DESCRIPTION" CELL FROM TAB "OPERATIONS". IN THIS CASE THE FIRST ROW CONTAINS ONE TRANSACTION, ROW 2 CONTAINS ONE TRANSACTION AND ROW 3 CONTAINS 2 TRANSACTIONS
2) IT SHOULD COPY THE NUMBER FROM TAB "OPERATIONS" AND PASTE IT INSIDE COLUMN "NUMBER" FROM TAB "DESCRIPTION" (only do this if it is FAC or N/C) AND THEN, IT HAS TO DO THE SUMATORY IN TAB "OPERATIONS". TAKE A LOOK:
29431
Expected output:
29433
I have attached a xlsx file
29432
Can help me?
Thanks!