Replace Cell Contents with other cell contents with "If"

brumby

Active Member
Joined
Apr 1, 2003
Messages
400
Hiya all,

I would like to do the following if possible :-

1. When my staff enter a value in 3 Columns ( I, J, K ), a hard copy is pasted as a reference point in for example ( AA,AB,AC ). This is a fixing point.

Then as changes are made in for example column X, eg a qty is entered. The corresponding Cell in I, J, K takes account of this and re calculates from the fixing point and uses that as base for calculation?

Does this make sense?

Many Thanks folks
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Can you more clear about what you are talking about with your second portion?

Then as changes are made in for example column X, eg a qty is entered. The corresponding Cell in I, J, K takes account of this and re calculates from the fixing point and uses that as base for calculation?
 
Upvote 0
sorry, it does not read clear lol.

example would be, if user entered a number on row 2, The cells in I,J,K would look at the reference point ( AA, AB, AC ) and adjust by the qty in x2?

hope it makes sense
 
Upvote 0
Ok, with the information that you gave me, I created a loop that should do what you want.
I supposed you want a loop because you won't have only 1 row of data.

Code:
Option Explicit


Sub SaveAndAdjust()
Dim i As Currency


'Loop through 100 row
For i = 2 To 100
    'Copy to AA,AB and AC
    Cells(i, 27) = Cells(i, 9)
    Cells(i, 28) = Cells(i, 10)
    Cells(i, 29) = Cells(i, 11)
    
    'Adjust by X
    Cells(i, 9) = Cells(i, 9) * Cells(i, 24)
    Cells(i, 10) = Cells(i, 10) * Cells(i, 24)
    Cells(i, 11) = Cells(i, 11) * Cells(i, 24)
Next


End Sub
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,289
Members
452,631
Latest member
a_potato

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