Macro Question

abarone

New Member
Joined
Mar 8, 2011
Messages
6
I am trying to figure out how to put a macro together to format an excel sheet to the following specs. I'm hoping someone can help me out here.

I need the macro to make all lines without any text set to 11 pixels in height
All lines with text to the following settings:

If the row has 1 line of text, it needs to be 18px in height
2 lines of text to 34px height
3 lines of text to 51px height
4 lines of text to 68px height
5 lines of text to 85px height


Is it possible to create some kind of macro to do this, as doing it maually every time is very tedious as I'm sure you can imagine!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Not sure this can be done. A macro can evaluate if a cell has wrapped text or not but depending on the cell width will determine the number of lines it contains if the row is set to autofit, but that initself I don't think can output the number of text rows. Be interested to see if a solution is provided though.
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

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