populate column

stevenash

New Member
Joined
Sep 25, 2011
Messages
3
Hey guys,
been coming to the site often lately and it has been a great help. this is the first time posting however.

A screenshot of my situation (Sorry, I'm not sure how to attach files onto the post)

http://imageshack.us/photo/my-images/825/subsution.png/

So basically I'm after vba code that will take the values from column H and substitute into cell C4, which then will give an output on C5, and this output values need to be placed in column I for corresponding inputs.

Would anyone shed some light into doing this? I'm just starting out learning VBA so sorry for the lack of knowledge.
Thanks
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Welcome to the MrExcel board!

You will get many more potential helpers if you post any small screen shot directly in your post. My signature block below suggests 3 ways you can do that. Test them out in the Test Here forum.

I assume C5 contains a formula that uses C4 as input?

If that is the case, couldn't we just put a similar formula in I2:Ix?
 
Upvote 0
Thank you very much, yes that is correct about the formula in the yellow cells. This is not exactly the problem I'm trying to solve but a small part of it and dummbed down so I can explain it clearly :)
I'm really looking for a way to do it in VBA.

hopefully this works:
Excel Workbook
BCDEFGHI
1******inputoutput
2******1*
3******2*
4input44****3*
5output88****4*
6******5*
7******6*
8******7*
9******8*
10******9*
11******10*
12******11*
13******12*
14******13*
Sheet1


Thank you again!
 
Upvote 0
When using Excel jeanie, if you preview your post before submitting then after the preview re-paste your jeanie code (it will most likely still be on your clipboard) over the old lot. That will eliminate all the asterisks.

I'm still not sure why we couldn't do something like this (or whatever other formula may be in C5)?

<font face=Courier New><br><SPAN style="color:#00007F">Sub</SPAN> CalcValues()<br>    Application.ScreenUpdating = <SPAN style="color:#00007F">False</SPAN><br>    <SPAN style="color:#00007F">With</SPAN> Range("I2", Range("I" & Rows.Count).End(xlUp)).Offset(, 1)<br>        .FormulaR1C1 = "=RC[-1]*2"<br>        .Value = .Value<br>    <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br>    Application.ScreenUpdating = <SPAN style="color:#00007F">True</SPAN><br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN><br></FONT>
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,188
Members
452,893
Latest member
denay

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