VBA help for cell alignment based upon content

tanithscout

New Member
Joined
Sep 4, 2012
Messages
2
Hi,

I have a worksheet that allows users to select various data for clients. The columns are set up as follows:
Client Property1 Property2 Property3 etc.

At the top of each property column is a drop-down allowing users to select the various data elements available - balance, address, tenure, etc.

Once the user selects the elements, the client data populates via a lookup from another worksheet. Depending upon the user selections, columns could hold text or numbers. I have conditional formatting in place to format the number fields as currency, but I can't figure out how to control the alignment. I would like any column formatted as text to align left, and any column formatted as number/currency to align right.

I am a novice with VBA but it seems there should be an easy way to do this. Is there code that can be used to monitor the entire sheet and apply the appropriate alignment anytime an update is made to the sheet?

I appreciate any help!
 

Some videos you may like

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Watch MrExcel Video

Forum statistics

Threads
1,123,324
Messages
5,600,956
Members
414,417
Latest member
Nobu

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
Top