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
4272DownUp10.1 U27 CU0.96597-0.00189-18.9

<tbody>
</tbody>
Sheet1
Bob
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
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.

<colgroup><col width="64"></colgroup><tbody>
</tbody>

<colgroup><col width="64"></colgroup><tbody>
</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
4272DownUp10.1 U27 CU0.96509-0.00101-10.1

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

Worksheet Formulas
CellFormula
K4='MT4'|BID!AUDCAD
L4=IF(B4="Sell",D4-K4,K4-D4)
M4=IF(K4>50,L4*100,L4*10000)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
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,215,004
Messages
6,122,656
Members
449,091
Latest member
peppernaut

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