Input box to count rows and highlight vba code

Goalexcel

Board Regular
Joined
Dec 28, 2020
Messages
101
Office Version
  1. 2016
Platform
  1. Windows
Hello Experts, kindly help to use a vba code for the below.

image1.png


Use inputbox to select from column A first 14 rows and color, next amount of rows follow the image above. Do the same on other sheets.
The result below
image2.png
 
Never knew you had data already in column A that you did not want colored.
I thought that was just a example

I thought we started off with column A being empty.
So explain again what your objective is?
This is my data Column A some number, and column C after make calculation to break those number in column A and group in color. Example, column A row 1 until 145.
We can add column D some number that need to repeat in column B , how many times go with column C.
1636604693270.png

After we run a macro, the result is below, macro input number 14 in the last rows of my original data.
1636604314528.png


We need to show the result like this

1636604823502.png

This macro need to run in sheet 1 until shee 8, the name of the sheet will change.
 
Last edited:
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
You never mentioned doing this is several different sheets.
And each sheet will have the same values in Column B ?
 
Upvote 0
This is beyond my knowledgebase.
I will continue to monitor this thread to see what I can learn.
You never mentioned doing this is several different sheets.
And each sheet will have the same values in Column B ?
No each sheet will have different values in column B and column C.
 
Upvote 0
Earlier we never mentioned column C
When I see your macro run and repeat numbers, I am thinking we can repeat numbers in column b, how many times depend on the number in the column C,
so I just moved to C and add column D to repeat this number in column B.
 
Upvote 0
When I see your macro run and repeat numbers, I am thinking we can repeat numbers in column b, how many times depend on the number in the column C,
so I just moved to C and add column D to repeat this number in column B.
Well that is good. Glad to see your reading the script and understand the logic.
It's always great to see users try and understand the logic of the code that way they may be able to write their own code to do what they want.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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