Revised: Comple VB Code needed

CHP2011

New Member
Joined
Feb 26, 2016
Messages
3
I need a VB code to let me do the following: 1) Select a variable range from a column of cells (call it the High’s column); 2) Find the maximum numeric value in that range (Max 1) and place this in another column on the same worksheet; 3) Record the row number and date of that cell from adjacent columns to that cell on the applicable worksheet in two different columns; 4) Reset the start of the variable range to the maximum value just found in step # 2; 5) Find the next cell maximum (Max # 2) and record this value in the same column but next cell as Max #1; 6) Record the row number and date of that cell from adjacent columns to that cell on the applicable worksheet in in the same column but next cell as the row number and date recorded in step # 3; 7) Calculate the number of cells between the maximums and record this on worksheet # 2; 8 ) Make a loop and find the next maximum, date and row number for max # 3 and record these as above; 9) Do all of these steps until all data has been examined; 10) For those ranges when no other maximum found in the variable range, go to the next variable range until another maximum is found; 11) include the # of rows in step 10 plus those for this step in the columns used for other data maximums as above.

Thank you.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
This site is really a place for you to ask questions to specific tasks, so we can help you accomplish what you are trying to do (we really try to help people help themselves). It sounds like you are really looking for someone to do a project for you (not something that you can really expect to be done for free).

If this is something you are really not interested in doing yourself and would like to hire someone to do, you can reach out to MrExcel Consulting Services here: MrExcel.com | Excel Resources | Excel Seminars | Excel Products

Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,915
Messages
6,122,217
Members
449,074
Latest member
cancansova

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