moe10134
Board Regular
- Joined
- Sep 8, 2005
- Messages
- 162
- Office Version
- 2019
- Platform
- Windows
Hello,
Any of you macro genius' out there know of any VB Code I can use to create an ongoing tally of results in the same cell? If cell B2 = 1 or 2 [will not be anything else except 1 and 2], Does anyone know how to create a tally for counting how many times a 1 appears and how many 2's appear in cell C2 & D2?
There are a lot of ways this macro can perform. One example would be adding a "1" in one cell row, then next time adding a "1" in next cell row, etc. to create a =COUNTA of all "1"'s . Then in next columm, same thing for "2", =COUNTA of all "2"'s.
1
1
1
1
2
2
2
2
Or placing the exact number that appears in B2 in a separate column as well, For an =COUNTIF.
1
1
2
1
2
2
Or having two cells, one cell to record for each "1", one cell to record for each "2" and a macro will count how many times, the 1 appears and how many times the 2 appears.
I am looking for a macro because it is a random generation of 1 or 2. Each time I click on the enter key after data in any cell in workbook or hit F9, the rand number changes to 1 or 2. I could track this manually with the examples above, but I cannot always keep any eye on that cell and note each time it changes. I'm looking for a way for Excel to automate it.
Any macro guru's got any suggestions? All your help is appreciated.
Kind Regards
Any of you macro genius' out there know of any VB Code I can use to create an ongoing tally of results in the same cell? If cell B2 = 1 or 2 [will not be anything else except 1 and 2], Does anyone know how to create a tally for counting how many times a 1 appears and how many 2's appear in cell C2 & D2?
There are a lot of ways this macro can perform. One example would be adding a "1" in one cell row, then next time adding a "1" in next cell row, etc. to create a =COUNTA of all "1"'s . Then in next columm, same thing for "2", =COUNTA of all "2"'s.
1
1
1
1
2
2
2
2
Or placing the exact number that appears in B2 in a separate column as well, For an =COUNTIF.
1
1
2
1
2
2
Or having two cells, one cell to record for each "1", one cell to record for each "2" and a macro will count how many times, the 1 appears and how many times the 2 appears.
I am looking for a macro because it is a random generation of 1 or 2. Each time I click on the enter key after data in any cell in workbook or hit F9, the rand number changes to 1 or 2. I could track this manually with the examples above, but I cannot always keep any eye on that cell and note each time it changes. I'm looking for a way for Excel to automate it.
Any macro guru's got any suggestions? All your help is appreciated.
Kind Regards