4 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Automate a process in Excel where I need to add numerical data of one column based on data of another column and populate the result in yet another column

Our take

To automate the process of summing numerical data in Excel, you can leverage the relationship between two columns: F, containing your numerical entries, and G, which includes zeroes. The goal is to calculate totals for entries in Column F that lie between adjacent zeroes in Column G and display these sums in Column H. For instance, if the values 4 and 3 are found between two zeroes in Column G, their sum of 7 will be placed in Column H directly above the second zero.

I have data in two columns - Column F and Column G in Excel. Column F contains numerical data and Column G contains only zeroes in certain cells . I need to add only those corresponding numerical data of Column F , which are lying between two adjacent zeroes of Column G. Please refer to the table below . I need to populate - 'Total Count at the end of the Day' without manually adding the data in 'Count' Column. For example , the corresponding numerical data for 'Count' column are 4, 3 and 0 which are lying between first two zeroes of 'Temporary Variable' - column G. The result of the sum , i.e. 4+3+0 =7 is to be populated in Column H and in the row above the second zero of Column G .

https://preview.redd.it/yx3brtzlmssg1.png?width=1179&format=png&auto=webp&s=5cabaa155817c0e09a17cdaf45664c754e9ebbbe

https://preview.redd.it/1f3oc7wnmssg1.png?width=1148&format=png&auto=webp&s=077cc128f1c19c9d024a100c0565e60b429af632

Date New Grievances sent to Subordinates Action Taken on Reopened Grievances New Grievances sent to Sections Grievances Replied Count Temporary Variable Total Count at the end of the Day Progressive Total Count (As on the Current Date)
Dt:1 0 0
a b c d 4
e f g 3
0 7
Dt:2 0 0
e h k n 4
f i l 3
g j m 3
0 10
Dt:3 0 0
o p r s 4
q y t 3
u 1
0 8
Dt:4 0 0
v w 2
x 1
0 3
Total Count at the End 0
submitted by /u/BrushThen7805
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article