How to get the amount matches with the input

I have a input value as 80.29

In datatable input as (dynamic)

Type. Value
A. 70.29
B. 10.00

First i need to take the value 70.29 and follow next step.since the input is 80.29 .i have taken only 70.29 remaining value need to take from next value 10

Scenario 2: input value 80.29
Type. Value
A. 80.29
B. 10.00

First i need to take the value 80.29 and follow next step.since the input is 80.29 and the first value same as input need not proceed further taken valuefirst value only.

Scenario 3

Type. Value
A. 90.29
B. 10.00
Take only 80.29 from first row since the input is 80.29

Hi , What you want to do is always select the value close to the input value? If so, you can pretend to take the difference of the values in the datatable according to the input value and select the little difference.

Yes correct

Was it the right solution for you?

Yes right solution only

1 Like

Can you explain in code

Is not close value ,first select the first row and proceed .since the first row value not equal to the input value take the value from second row

Sequence.xaml (9.6 KB)

You can organize data according to your process

I need to take both the value 70 and 10

First 70 i have taken and proceed to match the input remaing 10 need to take and proceed

With this process, you first choose which value you want to get. After this process, you can also select other data.

It’s not inside for loop right how can I choose next data

First i need to take the value 70 and update in Excel next i need to take remaing value of 80 ie 70 is already taken so 10 need to be take and update in excel

Hi @sruthesanju ,

Could you give a bit more explanation on the Scenario 3 ? Is it wrongly put / A Typing error ?

Since the value in first row is greater than input take only input value

@sruthesanju ,

Will there be a possibility of having an input in the below way ? :

Type. Value
A. 90.29
B. 10.00
C. 20.00
D. 80.29

or

Type. Value
A. 90.29
B. 10.00
C. 50.00
D. 30.29

In this case, we do have the input value, but the First value itself is greater than the input value , so do we stop and take the Input value or do we need to find the value (or sum of values that make the value) in the other consecutive cells ?

Let us know if the ordering is done first either Descending/Ascending or keep the received input as it is ?

We need to stop and take the input value

@sruthesanju ,

What would be the case if the values added up were less than the Input value ? Like with data below :

Input value = 80.29

Type. Value
A. 70.29
B. 5.00

What should be the output in this case ?

One more row will be there in that case

One more row 5 will be there