Good morning,

I have several worksheets with a Table 1 in column A from A5:A15 for example (see below). Although every table in each worksheet has 10 rows from A5:A10, not every row contains a value (many tables will have blank entries, and the topmost entry of each table will vary from worksheet to worksheet). Can someone help me with the following macro?

If thetopmost entryof table 1 is greater than C1, then set the topmost entry equal to C1

In the table below, if y in C1 = 0.75, then A5 would become 0.75

If thetopmost entryof table 1 is less than C1, then add the lesser of the following two values to thetopmost entryof Table 1:

1. The value needed for the sum of all entries in Table 1 to equal B1

2. The value needed for thetopmost entryof Table 1 to equal C1

So if x in B1 = 8.6, and y in C1 = 0.95, then A5 becomes 0.9. However, if x in B1 = 8.6 and C1 = 0.88, then A5 becomes 0.88.

M

## Bookmarks