Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Reference Variable Row Numbers in Macro
I am trying to write some code that will utilize an input box to find a value. At that point I want to run a macro that will reference the cell rows of all values that equal the input box value. I have sorted this column in ascending order so that similiar value will be together.
I believe the code I'm looking will look similar to this but I don't know how prepare the range.
For a = 1st cell row # = InputBox to Last Cell row # = InputBox
So say I have Finance in rows 2-5, HR in rows 6-9 and Sales in rows 10-15. If I entered HR in the input I would want to reference cells 6-9.
e.g. For a = 6 to 9
Can someone please help me with this problem?
0 · ·