odd row in % and even row in number format

VBABEGINER

Well-known Member
Joined
Jun 15, 2011
Messages
1,284
Office Version
  1. 365
Platform
  1. Windows
Hi Team,

How do I achieve this,
all Col A odd row nos in % format and even row are in number format..

Thanks..
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Select the range

Conditional Formatting
New Rule
Use a formula to determine...

2 formulas required

=MOD(ROW(),2)=1 format as Number percentage
=MOD(ROW(),2)=0 format as Number
 
Upvote 0
Use Conditional Formatting.

Select all the rows, then go to Conditional Formatting and add these two rules.

Rule 1: Add the following CF formula:
Code:
=ISODD(ROW())
and choose the percentage format option

Rule 2: Add the following CF formula:
Code:
=ISEVEN(ROW())
and choose the number format option
 
Upvote 0
Hi K99, Thanks for providing the solution.. I tried but m not getting, may b'coz i properly not understand's..

Hi Joe, Thanks for providing the solution.. It works and pretty simple for me to understand..
 
Upvote 0
=MOD(ROW(),2)=1

Takes the row number and after dividing by 2 if the remainder is 1 then it is an odd row, if it is 0 then it is an even row.
So you format the cell depending on the remainder being 1 or 0.

Maybe it needs to be this

=(MOD(ROW(),2)=1)
and
=(MOD(ROW(),2)=0)

Not really much different to the other solution provided.

if you put the =(MOD(ROW(),2)=1) formula in a blank cell and copy down the column it should say TRUE FALSE TRUE FALSE TRUE FALSE indicating odd and even rows.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

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