Custom Cell format

iLuvbase

New Member
Joined
Jun 24, 2011
Messages
10
I need to create a custom cell format that is immune to how someone enters types their data.

Basically we generate quotes on a Q# basis, but we may have multiple configurations for a single quote number.

e.q - we may have Q4457, Q4457A, Q4457B, C - etc.

However - coworkers enter data in different manners.

For example - if I enter 4457, I want the cell to display Q4457.

If I enter Q4457 I want it to read Q4457.

If i enter 4457A, I need it to read Q4457A.

If I enter Q4457A, I need it to read Q4457A.

Things I've tried -

Q# - Displays properly for 4457 or Q4457, and Q4457A - does not work for 4457A (Shows only 4457A, no leading Q)

Q@ - Displays properly for 4457 and 4457A - Does not work for Q4457 or Q4457A (displays 2 Qs at beginning)
 
well if you can get along without merging the cells --- just stretch them out and use the code that way until you can upgrade or figure this out
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Merged Cells in Excel 97 are a pain for the very reason you found - you can't do much with them but look at them!

You need to change the cells from "Merged" to "Centre across Selection", which looks like Merged but can be processed.

First select the merged Column or range of cells, assuming that all rows of the column are identically merged, and then go to Format / Cells / Alignment. You should find that there is a tick against Merge Cells - turn it off. Then below Horizontal, under Text Alignment, select the option "Center across Selection", and then OK and your problems should be solved.
 
Upvote 0
I don't have access to Excel 97, so I have no way to try and jury-rig a work-around for you. Sorry. All I can say is the code I posted works fine on my copy of XL2003. I guess I'll have to leave you in the hands of those who know something about Excel 97 and hope they will be able to help you out.
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,673
Members
452,937
Latest member
Bhg1984

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