Reference cell in ActiveCell row but different column

BigTenBoy15

New Member
Joined
Feb 24, 2016
Messages
9
I'm trying to get a cell in a VBA code to reference the value in column J (in the same row as ActiveCell) and multiply it by another value. I currently have used "= RC[-30] * RC[-39]" for the cell value to be input, but I have to do this for a number of different cells. The RC[-30] part will always stay the same but I want RC[-39] to always reference column J of the ActiveCell row instead of having to enter RC[-40], RC[-41], RC[-42], .... for the 20+ cells I need to do this for. Let me know if you have any suggestions. Thanks!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Sorry I started typing up a response and got distracted.
Just to follow up on what Andrew said, if the value is between square brackets, it is an offset from the ActiveCell.
If the number is not between square brackets, it is the "hard-coded reference", i.e. C10 means the tenth column (which is column J).
 
Upvote 0

Forum statistics

Threads
1,215,506
Messages
6,125,193
Members
449,213
Latest member
Kirbito

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