How to execute 2 commands in a cell

Barcode

Board Regular
Joined
Sep 8, 2009
Messages
75
I need to execute 2 commands in N but don't see how I can do that.

The value in K is from another program using DDE and is continually changing.

When M is >= F I want to Move F to N and move zero to K.

I need to zero out K to stop any more processing on this row.

N will be zero while this row is being processed, or equal to F when the processing is finished.

FGHIJKLMN
DownUp10.1 U27 CU

<tbody>
[TD="align: center"]4[/TD]
[TD="align: center"]272[/TD]

[TD="align: right"]0.96597[/TD]
[TD="align: right"]-0.00189[/TD]
[TD="align: right"]-18.9[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1
Bob
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
I see it as a two step process. In N4 type =IF($M4>=$F4,$F4,0) and in O4 do a second formula =IF($N1>=0,0,$K1). Once you done this for all rows just copy and paste special values in K column. You can just record a macro for this if you are doing this multiple times. Hope this helps.
[TABLE="width: 64"]
<colgroup><col width="64"></colgroup><tbody>[TR]
[TD="width: 64, align: right"][/TD]
[/TR]
</tbody>[/TABLE]

<colgroup><col width="64"></colgroup><tbody>
[TD="width: 64, align: right"][/TD]

</tbody>
 
Upvote 0
Thanks very much for the reply.
When I enter the statement in N4 I'm getting a circular reference. Here is the row with formulas:

FGHIJKLMN
DownUp10.1 U27 CU

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]4[/TD]
[TD="align: center"]272[/TD]

[TD="align: right"]0.96509[/TD]
[TD="align: right"]-0.00101[/TD]
[TD="align: right"]-10.1[/TD]
[TD="align: right"][/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]K4[/TH]
[TD="align: left"]='MT4'|BID!AUDCAD[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]L4[/TH]
[TD="align: left"]=IF(B4="Sell",D4-K4,K4-D4)[/TD]
[/TR]
[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]M4[/TH]
[TD="align: left"]=IF(K4>50,L4*100,L4*10000)[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0
Basically what I want to achieve is to stop processing on the row when M >= F, in this case when M = 272 or greater.


The only way that I see is to clear the formula from K which I haven't been able to do without getting a circular reference error.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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