Conditionally Move Data?

napalmmk9

New Member
Joined
Dec 9, 2004
Messages
9
I have a worksheet on which I am trying to move data from one column to another based on a condition. Basically, I need to move moneys from an "encumbered" column to a "spent" column based on whether or not an item was recieved -- a binary condition, so I thought I could use a checkbox, although I don't know my VBA too well (hence asking here), and I'd need a check box in practically every row on the spreadsheet. I eventually tried an if function.

So "spent" is column a, "encumbered" is column b, and "is item recieved" is in column c.

So I tried =IF(c1="yes", a1=b1, ""), in d1, which obviously returned "false."

Ideally, if c1="yes", I'd like a1 to equal b1, and then, subsequently, b1 to equal 0.

Any thoughts?

Thanks in advance.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
You cannot use a formula to change the value of another cell. You could, however, add columns called "adjusted spent" (column D)and "adjusted encumbered" (column E).

D2 = if(c2="yes",b2,a2)
E2 = if(c2="yes",0,b2)
 
Upvote 0

Forum statistics

Threads
1,202,984
Messages
6,052,916
Members
444,613
Latest member
questionexcelz

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