Aberdham

Board Regular
Joined
Mar 8, 2018
Messages
163
Office Version
  1. 365
Platform
  1. Windows
Hi,

Could anyone take a look into the formula for me please?

It seems something went wrong, and all the result Returns to be "0"

SUMPRODUCT('Lease-Sales'!$G$462:$G$579*ISNUMBER(FIND(""&"RD"&"";'Lease-Sales'!$B$462:$B$579))-'Lease-Sales'!$G$462:$G$579*ISNUMBER(FIND(""&"RC"&"";'Lease-Sales'!$B$462:$B$579));('Lease GP April'!$B3='Lease-Sales'!$A$462:$A$579);(C$3=LEFT('Lease-Sales'!$D$462:$D$579;LEN(C$3))))


Your assistance will be greatly appreciated !!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Not sure what you are trying to do but you need to convert (coerce) the logical values in the comparisons to 0 or 1.
I recommend the double unary-operator --, that is:
--('Lease GP April'!$B3='Lease-Sales'!$A$462:$A$579)
and
--(C$3=LEFT('Lease-Sales'!$D$462:$D$579;LEN(C$3)))

Hope this helps

M.
 
Upvote 0
Not sure what you are trying to do but you need to convert (coerce) the logical values in the comparisons to 0 or 1.
I recommend the double unary-operator --, that is:
--('Lease GP April'!$B3='Lease-Sales'!$A$462:$A$579)
and
--(C$3=LEFT('Lease-Sales'!$D$462:$D$579;LEN(C$3)))

Hope this helps

M.

Thanks for your reply! So I have These 3 tables:

Table 1 Revenue
SNInvoice no.Customerdescriptionamount Dollarexchange rateamount euro
15895815RD000268ASDprocess_fee_23.04-22.05.2017_SN_158958 $ 38.850,00 $ 1,2361 € 31.429,50
15895815MD000158ASDregistration_fee_01.03-31.03.2017_ESN_158958 $ 57.722,00 $ 1,2323 € 46.840,87
15895815RC000158ASDprocess_fee_23.04-22.05.2017_ESN_158958 $ 2.102,00 $ 1,2323 € 1.705,75
15895815MC000159ASDregistration_fee_01.03-31.03.2017_ESN_158958 $ 5.541,00 $ 1,2323 € 4.496,47

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>


Table 2Cost
SNInvoice no.Customerdescriptionamount Dollarexchange rateamount euro
158958SAEL-18-0036-04ASDprocess_fee_10.04-09.05.2017_SN_158958 $ 37.233,49 $ 1,2308 € 30.251,45
158958200-PANIN-000058ASDregistration_fee_01.03-31.03.2017_SN_158958 $ 82.483,14 $ 1,2321 € 66.945,17

<tbody>
</tbody><colgroup><col><col><col><col><col><col><col></colgroup>

Table 3
SNPF (Revenue)RF
(Revenue)
PF
(cost)
RF
(cost)
158958 € 29.723,74 € 42.344,40 € 30.251,45 € 66.945,17

<tbody>
</tbody><colgroup><col><col><col><col><col></colgroup>

Table 1 and Table 2 are the Output tables and table 3 is the Input table

PF and RF in table 3 are taken from table 1
and the PF and RF from the cost side is extracted from table 2

and the formula i am using now is:
=SUMPRODUCT('Lease-Sales'!$G$462:$G$579*ISNUMBER(FIND("RD";'Lease-Sales'!$B$462:$B$579))-'Lease-Sales'!$G$462:$G$579*ISNUMBER(FIND("RC";'Lease-Sales'!$B$462:$B$579));--('Lease GP April'!$B9='Lease-Sales'!$A$462:$A$579);--(C$2=LEFT('Lease-Sales'!$D$462:$D$579;LEN(C$2))))

and return to "0"

can you please tell me what went wrong? Thank you.
 
Upvote 0
I think you meant Table 1 and Table 2 are the Input tables (given) and table 3 is the Output table (desired results)

Maybe something like this...


A
B
C
D
E
F
G
1
Table 1​
Revenue​
2
SN​
Invoice no.​
Customer​
description​
amount Dollar​
exchange rate​
amount euro​
3
158958​
15RD000268​
ASD​
process_fee_23.04-22.05.2017_SN_158958​
38.850,00​
1,2361​
31.429,50​
4
158958​
15MD000158​
ASD​
registration_fee_01.03-31.03.2017_ESN_158958​
57.722,00​
1,2323​
46.840,87​
5
158958​
15RC000158​
ASD​
process_fee_23.04-22.05.2017_ESN_158958​
2.102,00​
1,2323​
1.705,75​
6
158958​
15MC000159​
ASD​
registration_fee_01.03-31.03.2017_ESN_158958​
5.541,00​
1,2323​
4.496,47​
7
8
9
Table 2​
Cost​
10
SN​
Invoice no.​
Customer​
description​
amount Dollar​
exchange rate​
amount euro​
11
158958​
SAEL-18-0036-04​
ASD​
process_fee_10.04-09.05.2017_SN_158958​
37.233,49​
1,2308​
30.251,45​
12
158958​
200-PANIN-000058​
ASD​
registration_fee_01.03-31.03.2017_SN_158958​
82.483,14​
1,2321​
66.945,17​
13
14
Table 3​
15
SN​
PF (Revenue)​
RF (revenue)​
PF (cost)​
RF (cost)​
16
158958​
29.723,74​
42.344,40​
30.251,45​
66.945,17​

<tbody>
</tbody>


Values in blue
Formula in B16
=SUMPRODUCT(--($A$3:$A$6=A16),ISNUMBER(SEARCH("RD",$B$3:$B$6))*$G$3:$G$6-ISNUMBER(SEARCH("RC",$B$3:$B$6))*$G$3:$G$6)

Formula in C16
=SUMPRODUCT(--($A$3:$A$6=A16),ISNUMBER(SEARCH("MD",$B$3:$B$6))*$G$3:$G$6-ISNUMBER(SEARCH("MC",$B$3:$B$6))*$G$3:$G$6)

It's not clear what are the criteria to get the values in red (D16 and E16). Could you clarify?

M.
 
Upvote 0
I think you meant Table 1 and Table 2 are the Input tables (given) and table 3 is the Output table (desired results)

Maybe something like this...


A
B
C
D
E
F
G
1
Table 1​
Revenue​
2
SN​
Invoice no.​
Customer​
description​
amount Dollar​
exchange rate​
amount euro​
3
158958​
15RD000268​
ASD​
process_fee_23.04-22.05.2017_SN_158958​
38.850,00​
1,2361​
31.429,50​
4
158958​
15MD000158​
ASD​
registration_fee_01.03-31.03.2017_ESN_158958​
57.722,00​
1,2323​
46.840,87​
5
158958​
15RC000158​
ASD​
process_fee_23.04-22.05.2017_ESN_158958​
2.102,00​
1,2323​
1.705,75​
6
158958​
15MC000159​
ASD​
registration_fee_01.03-31.03.2017_ESN_158958​
5.541,00​
1,2323​
4.496,47​
7
8
9
Table 2​
Cost​
10
SN​
Invoice no.​
Customer​
description​
amount Dollar​
exchange rate​
amount euro​
11
158958​
SAEL-18-0036-04​
ASD​
process_fee_10.04-09.05.2017_SN_158958​
37.233,49​
1,2308​
30.251,45​
12
158958​
200-PANIN-000058​
ASD​
registration_fee_01.03-31.03.2017_SN_158958​
82.483,14​
1,2321​
66.945,17​
13
14
Table 3​
15
SN​
PF (Revenue)​
RF (revenue)​
PF (cost)​
RF (cost)​
16
158958​
29.723,74​
42.344,40​
30.251,45​
66.945,17​

<tbody>
</tbody>


Values in blue
Formula in B16
=SUMPRODUCT(--($A$3:$A$6=A16),ISNUMBER(SEARCH("RD",$B$3:$B$6))*$G$3:$G$6-ISNUMBER(SEARCH("RC",$B$3:$B$6))*$G$3:$G$6)

Formula in C16
=SUMPRODUCT(--($A$3:$A$6=A16),ISNUMBER(SEARCH("MD",$B$3:$B$6))*$G$3:$G$6-ISNUMBER(SEARCH("MC",$B$3:$B$6))*$G$3:$G$6)

It's not clear what are the criteria to get the values in red (D16 and E16). Could you clarify?

M.

The red ones are from table 2
G11 and G12 respectively,
however, there's no define rules for invoice number such as the ones in table 1
 
Upvote 0
The red ones are from table 2
G11 and G12 respectively,
however, there's no define rules for invoice number such as the ones in table 1

If there are no rules to follow how can one create a formula to get the proper value?

M.
 
Upvote 0
If there are no rules to follow how can one create a formula to get the proper value?

M.

To link the SN and the description?

since in table 3 the PF and RF stands for process fee and registration fee respectively.
Perhaps to use a recognition and sum product or aggregate would do the job?

would be great if you could help.
Thanks!
 
Upvote 0
To link the SN and the description?

since in table 3 the PF and RF stands for process fee and registration fee respectively.

Try
D16
=SUMPRODUCT(--($A$11:$A$12=A16),--ISNUMBER(SEARCH("process",$D$11:$D$12)),$G$11:$G$12)

E16
=SUMPRODUCT(--($A$11:$A$12=A16),--ISNUMBER(SEARCH("registration",$D$11:$D$12)),$G$11:$G$12)

M.
 
Upvote 0
If there are no rules to follow how can one create a formula to get the proper value?

M.

and at the end of the description, there is always an indication of _SN xxxxxx
so perhaps to satisfy the description as PF(process fee) or RF (registration fee) as well as the SN
we have the formula?
 
Upvote 0
and at the end of the description, there is always an indication of _SN xxxxxx
so perhaps to satisfy the description as PF(process fee) or RF (registration fee) as well as the SN
we have the formula?

See post 8

M.
 
Upvote 0

Forum statistics

Threads
1,215,108
Messages
6,123,129
Members
449,097
Latest member
mlckr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top