Excel Table - how to force inconsistent formulas

illusionek

Board Regular
Joined
Jun 21, 2014
Messages
104
Hello

I am working on a report and ideally I would like to use Excel table as the report will be constantly updated/new records added and I would like users to avoid dragging down formulas if the range extends so the Table would do the trick.

I need however to be able to do inconsistent formulas in the column for example Row 5 would be Vlookup, Row 6 SumIf etc the idea is that when new value gets added to the table then the same formulas would get repeated.

In the below example, lets assume I have only values A and B in Col1 and then I add C and I would like Vlookup and SumIf to get extended automatically.

I googled this but I can see only solutions on how to fix inconsistent formulas rather than other way around


Col1Col2
AVlookup
ASumif
BVlookup
BSumif
CVlookup
CSumif
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi

I propose two solutions. I would recommend the second one which is more in line with a table.


Mappe10
ABCDEFG
1Col1Col2Col1Col2Col3
2AvlookupAvlookupsumif
3AsumifBvlookupsumif
4BvlookupCvlookupsumif
5Bsumif
6Cvlookup
7Csumif
Tabelle1
Cell Formulas
RangeFormula
B2:B7B2=CHOOSE(MOD(ROW([@Col1]),2)+1,"vlookup","sumif")
 
Upvote 0
Could I make it work if I wanted to drag across as well?

I have oversimplified my example above as the table would expand in both directions.

The issue here is that the sum range in sumif would need to change accordingly as I am dragging formula to the right.
 
Upvote 0
Maybe a pivot table would be the best solution.
Or do it with Power Query.
 
Upvote 0

Forum statistics

Threads
1,214,948
Messages
6,122,420
Members
449,083
Latest member
Ava19

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