Allocating a letter reference to a row in excel using

QS Guy

New Member
Joined
Oct 19, 2017
Messages
5
Hi, first post so hopefully I don't sound like too much of a novice!

I want to have certain rows with a character reference running from A-Z
However I only want it to have a reference if there is data on that row.

For example if cell B1 has data then I want A1 to say "A"
If the next row holds no data I want to skip that row.
If B3 has data then A3 would read "B" and so on.

I have tried messing around with =CHAR(CODE(A1)+1) but it only works when it's for every row

Is there a way to say =IF B1 <>"" then A1 = CHARACTER FROM LAST FILLED CELL+1


Hopeful that makes sense to somebody. :rolleyes:
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Welcome to the Board!

Place this formula in cell A1 and copy down column A for as far as you need:
Code:
=IF(B1<>"",CHAR(64+COUNTA($B$1:$B1)),"")
 
Upvote 0
Welcome to the board.

In A1 try:
Code:
=IF(LEN(B1),CHAR(COUNTA($B$1:$B1)+64),"")
Then drag down as required.
 
Upvote 0
You are welcome!

They pretty much work the same way. The only difference is how each checks for an empty string in column B.
In Excel, there are often many different ways to accomplish the same thing!:)
 
Upvote 0

Forum statistics

Threads
1,223,909
Messages
6,175,314
Members
452,634
Latest member
cpostell

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