hi,
there isn't a formula that can do this but left and right justification is a
cell property and this can be detected with code. i am not sure how you feel
about running a macro to do this. plus you said "in each row", which may
present a problem. the search would be cell by cell so depending on how much
data you have(rows and columns), the macro could take a while to run to
complete. so how critical is knowing how many right justified cells you have?
post back if you would like to try a macro. i'll need to know number of
column and rows.
Regards
FSt1
"Laura" wrote:
Maybe I wasn't clear . . . I don't need to sum the total of the cells I need
to know how many cells are right-justified in each row. I hope that is a
clearer explanation of what I am looking for.
--
Thank you for your assistance.
Laura
"Bernie Deitrick" wrote:
Laura,
Justification doesn't change the underlying cell value, so it can be misleading. If you enter a
number, the default justification is right: enter that smae number with a leading single quote (to
enter it as a string) and the default justification is left. But you can change either
justification using formatting.
For normally entered values in non-formatted cells, if you use a formula like
=A1+A2
and you will get the sum of the values, whether they are strings or not, as opposed to
=SUM(A1:A2)
which will only sum up true numbers.
To count the number of true numbers in a row, you can use (to count the numbers in row 1):
=SUMPRODUCT(ISNUMBER(1:1)*1)
Your boss needs to do a better job of designing his spreadsheet.
HTH,
Bernie
MS Excel MVP
"Laura" wrote in message
...
I am working on a spreadsheet and the project manager needs me to write a
formula to count right-justified cells in each row (so he will know if the
information is going to be used for his calculations). I was told that Excel
doesn't have anything built in to do this, but can it be done. If so, how????
--
Thank you for your assistance.
Laura
|