Returning a result to active row?

Magriza

Well-known Member
Joined
Nov 16, 2005
Messages
508
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

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,344
Office Version
  1. 365
Platform
  1. Windows
Certainly sounds feasible.

But what value do you want to appear in column L?
 

Barrie Davidson

MrExcel MVP
Joined
Feb 10, 2002
Messages
2,330
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?
 

Magriza

Well-known Member
Joined
Nov 16, 2005
Messages
508
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:
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,546
Messages
5,838,018
Members
430,526
Latest member
NiceGuyWithExcel2007

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
Top