Row Height adjusted based on content via code or Macro

SBass

New Member
Joined
Oct 11, 2017
Messages
17
I have a worksheet that contains two cells that are populated via a series of nested IF statements based on the contents of another cell. The issue is that one of the statements generates a MUCH longer text string than the other two options. To make the text appear aesthetically pleasing, the rows need to be at a height of 40 for the longer string, but only 15 for the other strings. I realize that I can't accomplish this with conditional formatting, but there has to be a way to do it. I'm open to ideas/suggestions, even if it includes simple code or a macro.
 

Excel 2012
AB
8
73 
74 
BBA
Cell Formulas
RangeFormula
A73=IF(B8="Business Management"," MBA-5110",IF(B8="Business Leadership", "MSOL-5103",IF(B8="Technology and Innovation Management","TIM-6101, TIM-6110, TIM-6301, TIM-6501, TIM-6601, OR TIM-5010","")))
A74=IF(B8="Business Management"," MBA-5121",IF(B8="Business Leadership", "MSOL-5104",IF(B8="Technology and Innovation Management","TIM-6120, TIM-6310, TIM-6510, TIM-6210, OR TIM-6410","")))
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Excel 2012
AB
8
73
74

<colgroup><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
BBA

Worksheet Formulas
CellFormula
A73=IF(B8="Business Management"," MBA-5110",IF(B8="Business Leadership", "MSOL-5103",IF(B8="Technology and Innovation Management","TIM-6101, TIM-6110, TIM-6301, TIM-6501, TIM-6601, OR TIM-5010","")))
A74=IF(B8="Business Management"," MBA-5121",IF(B8="Business Leadership", "MSOL-5104",IF(B8="Technology and Innovation Management","TIM-6120, TIM-6310, TIM-6510, TIM-6210, OR TIM-6410","")))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
I'm sorry but your posting isn't clear. Perhaps you could upload a copy of your file to a free site such as www.box.com. or www.dropbox.com. Once you do that, mark it for 'Sharing' and you will be given a link to the file that you can post here.
 
Upvote 0
I can't with the firewalls that are in place here. That post was made using that add-in from the link you provided. I can copy & paste the content. I will do that below, but I don't think it will show the gridlines.

Specialization:
GI?
Summary of Prior Institutions
External Institution
Institution Abbreviation
Accreditation
Type of credit
Credits transferred
Purpose of transcript
Totals
Required General Education Coursework
Credits Satisfied
Source
Coursework
English:
English Comp 1
English Comp 2
Mathematics:
College-level Math
Humanities:
HUM1
HUM2
Natural Sciences:
NAT1
NAT2
Social/Political Sciences:
SOC1
SOC2
General Education Electives: (can fit any of the above categories)
ELE1
ELE2
ELE3
Undergraduate Electives
Elective 1
Elective 2
Elective 3
Elective 4
Elective 5
Elective 6
Elective 7
Elective 8
Elective 9
Elective 10
Elective 11
Elective 12
External Credit Total
0
Internal Credit Total
0
Core Coursework
Credit Value
Source
Coursework
BBA-4020
BBA-4019
ACT-4050
BBA-3001
BBA-3003
BBA-3004
BBA-4000
BBA-4004
BBA-4003
BBA-4002
BBA-4025
External Credit Total
0
Internal Credit Total
0
Specializations
Credit Value
Source
Coursework
External Credit Total
0
Internal Credit Total
0

<tbody>
</tbody>
 
Upvote 0
Two of the cells below Specializations based on the content of the cell at the top next to "Specialization:" are the cells that when they text wrap are not adjusting the row height. I have tried turning it one via the Formatting, but that doesn't work, either.
 
Upvote 0
Thank you so much for your help! I opened that file & it works. The workbook that I am working on was originally created by someone else, so maybe it's an issue with that workbook. I might try creating it from scratch. Thank you so much for all your help! :)
 
Upvote 0

Forum statistics

Threads
1,216,110
Messages
6,128,892
Members
449,477
Latest member
panjongshing

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