Returning a result to active row?

Magriza

Well-known Member
Joined
Nov 16, 2005
Messages
509
Office Version
  1. 365
Platform
  1. Windows
Good evening to everyone in this time zone,

I'm sitting here listening to the JCB song: http://www.jcbsong.co.uk and trying to puzzle out a problem that's been bugging me all week. Any assistance would be gratefully appreciated.

If I have a spreadsheet where I use a macro to enter data in a defined range of cells, is it possible to have that macro also record specific result in the active row but outside the range?

For example: My macro would place a value in the active cell in the range A1:J10. If I select cell C3 and run the macro, I would like another - different - result to be displayed in cell L3. If I then select cell F10 and run the macro, another result would be displayed in cell L10. So the column remains fixed as "L" but the row is dependent on the active cell.

Hopefully that makes sense and that it's feasible.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Certainly sounds feasible.

But what value do you want to appear in column L?
 
Upvote 0
Very feasible. Something like?
Code:
Dim DestinationRange As Range

Set DestinationRange = Cells(ActiveCell.Row, 12)
'your code
DestinationRange.Value = "Whatever" 'your code determines this

Does this help?
 
Upvote 0
Hi Norie,

The result is dependent on a user form and gathered input. I'd managed to get that part working fine, just not how to place it where I needed it.

Barrie, thank you! You've saved my sanity (though some would say too late). It works perfectly! :biggrin:
 
Upvote 0

Forum statistics

Threads
1,214,523
Messages
6,120,030
Members
448,940
Latest member
mdusw

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