anubhavm10
New Member
- Joined
- Jul 10, 2014
- Messages
- 6
[TABLE="width: 500"]
<tbody>[TR]
[TD]CrankAngle[/TD]
[TD]1100 RPM[/TD]
[TD]1200 RPM[/TD]
[TD]1300 RPM[/TD]
[/TR]
[TR]
[TD]360[/TD]
[TD]0.7 Pascal[/TD]
[TD]0.5 Pa[/TD]
[TD]0.6 Pa[/TD]
[/TR]
[TR]
[TD]359[/TD]
[TD]0.6 Pa[/TD]
[TD]0.6 Pa[/TD]
[TD]0.8 Pa[/TD]
[/TR]
[TR]
[TD]358[/TD]
[TD]0.5 Pa[/TD]
[TD]0.4 Pa[/TD]
[TD]0.9 Pa[/TD]
[/TR]
[TR]
[TD]357[/TD]
[TD]0.4 Pa[/TD]
[TD]0.3 Pa[/TD]
[TD]0.3 Pa[/TD]
[/TR]
</tbody>[/TABLE]
I have a spreadsheet of pressures with rpm as columns and Crank Angles as Rows. My task is to write a macro to extract a particular set of rpm, a pressure for that rpm and corresponding crank Angle. The user should click on the required RPM cell and the RPM value gets stored . Then the user should click on the required pressure cell and the pressure value gets stored.
Then the user should click on the corresponding crank angle cell and the crank angle value gets stored in a separate variable. I have tried using the Worksheet_SelectionChange but it only works for one value ( ie the first one RPM).
Is it possible to write this code in a module , without going to worksheet code . Please help , I am new to VBA programming.
<tbody>[TR]
[TD]CrankAngle[/TD]
[TD]1100 RPM[/TD]
[TD]1200 RPM[/TD]
[TD]1300 RPM[/TD]
[/TR]
[TR]
[TD]360[/TD]
[TD]0.7 Pascal[/TD]
[TD]0.5 Pa[/TD]
[TD]0.6 Pa[/TD]
[/TR]
[TR]
[TD]359[/TD]
[TD]0.6 Pa[/TD]
[TD]0.6 Pa[/TD]
[TD]0.8 Pa[/TD]
[/TR]
[TR]
[TD]358[/TD]
[TD]0.5 Pa[/TD]
[TD]0.4 Pa[/TD]
[TD]0.9 Pa[/TD]
[/TR]
[TR]
[TD]357[/TD]
[TD]0.4 Pa[/TD]
[TD]0.3 Pa[/TD]
[TD]0.3 Pa[/TD]
[/TR]
</tbody>[/TABLE]
I have a spreadsheet of pressures with rpm as columns and Crank Angles as Rows. My task is to write a macro to extract a particular set of rpm, a pressure for that rpm and corresponding crank Angle. The user should click on the required RPM cell and the RPM value gets stored . Then the user should click on the required pressure cell and the pressure value gets stored.
Then the user should click on the corresponding crank angle cell and the crank angle value gets stored in a separate variable. I have tried using the Worksheet_SelectionChange but it only works for one value ( ie the first one RPM).
Is it possible to write this code in a module , without going to worksheet code . Please help , I am new to VBA programming.