counting in vba

kjacw

Board Regular
Joined
Jun 29, 2010
Messages
144
Hello all.
I am somewhat new to vba. I am familiar with some things. I am trying to create a count of how many books will be ordered. I have a form with a list of books on Formulario sheet (B16:B29). This list doesn't grow. The list of books changes from 1st to 12th grade. In A16:A29 is a range used by the user to indicate which book will be ordered by marking the cell with "P" (the cells are formatted so that the "P" translates to a check mark)
I have a macro that uses a different sheet (Libro) to fill a form and then send that data of books, name and which grade. I would like to know how can I create a macro to count how many books have been ordered. That is only the books with a mark next to it will be counted. I was trying to use something like a For Each loop with the count if VBA function.
Could this be possible and populate that info on the Libros sheet.
Thanks
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
You want to count the check marks on sheet Formulario in cells A16:A29 and add to the counts on sheet Libro cells??? Is that correct? What are the destination cells on Libro that have the counts?
 
Upvote 0
You want to count the check marks on sheet Formulario in cells A16:A29 and add to the counts on sheet Libro cells??? Is that correct? What are the destination cells on Libro that have the counts?

The check marks are books ordered. So i want that when that check mark is there then maybe list that book and count it. When another instance of books are ordered if that same book is ordered then that 2 books. The idea is counting books to keep up with how many of a book has been ordered and place that book with it quantity on the Formulario sheet. I am not home now but when Ireturn I will send you a copy of the workbook that I have.

ve
 
Upvote 0
You want to count the check marks on sheet Formulario in cells A16:A29 and add to the counts on sheet Libro cells??? Is that correct? What are the destination cells on Libro that have the counts?

FORMULARIO

*
A
B
C
D
E
15
*
Libros
16
*
Story Tree
*
*
*
17
*
Treasure Chest
*
*
*
18
*
Hidden Treasure
*
*
*
19
*
No Longer a Nobody
*
*
*
20
*
Handbook for Reading
*
*
*

<tbody>
</tbody>

Here is the Sheet with the various books that are changed from time to time. I would like that whenever A19, A20 is checked with an X or something, the book then will be copied and listed with its quantity. Then the next ordering of the book the book info will change for another student and then this book will be listed on the Libros sheet. All the books that are ever used on the form are listed on the Libros sheet under Fi rst Grade, Second Grade all the way to Twelfth Grade. I hope this helps. Thanks for your quick reply.
 
Upvote 0

Forum statistics

Threads
1,203,250
Messages
6,054,383
Members
444,721
Latest member
BAFRA77

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