Altering values of one cell in increments based on the value of cells in a row

Status
Not open for further replies.

Murchie

New Member
Joined
Dec 13, 2022
Messages
5
Office Version
  1. 2019
Platform
  1. Windows
I'm a little bit stuck trying to create a formula for a spreadsheet that I am working on.

I am trying to simplify data I have collected in a table into two cells, what I need to do is have the value of the cell I have marked x to increase by +1 (starting from 0) for each green cell with a 1 in it on each row (the x value for each week is based on the number of green cells with a 1 in them on that row)

I also would like for the value of the cell I have marked y to increase by +1 (starting from 0) for each red cell with a 2 in it on each row. The cells that are coloured blue with no number inside of them I would like the formula to ignore. White cells haven't been updated yet as I have to update the spreadsheet weekly.

Any help on this would be greatly appreciated :)
help please.PNG
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Welcome to the MrExcel board!

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Could you post again using the above, but also include the expected results, entered manually?

Also, all of your "1" cells are green and all of your "2" cells are red, so do we actually have to consider the colour, or just the value?
 
Upvote 0
Welcome to the MrExcel board!

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.

Could you post again using the above, but also include the expected results, entered manually?

Also, all of your "1" cells are green and all of your "2" cells are red, so do we actually have to consider the colour, or just the value?
Hi there, thank you for your quick reply,

I have tried to use the add in however I get a message stating that "microsoft has blocked macros from running because the source of the file is untrusted"

In regards to my question, the cell colour isn't important as the colour is just to make the table look better, the value is the only relevant part for the formula, i have edited the x and y values to what i would expect the results to be for the formula.
 

Attachments

  • help 2.PNG
    help 2.PNG
    4.7 KB · Views: 17
Upvote 0
Hi there, thank you for your quick reply,

I have tried to use the add in however I get a message stating that "microsoft has blocked macros from running because the source of the file is untrusted"

In regards to my question, the cell colour isn't important as the colour is just to make the table look better, the value is the only relevant part for the formula, i have edited the x and y values to what i would expect the results to be for the formula.
I've got the add in working now so i will repost my original question
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,705
Messages
6,173,985
Members
452,540
Latest member
haasro02

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