# Help with IF and OFFSET formulas



## muffingirl (Dec 26, 2022)

Hello everyone,

I am trying to do a catalogue of items with pictures (that will be inserted with a macro). But I am having problems to make excel select certain data than others when I am dragging down the formulas.

I have 4 columns where I need to put information. 1. for the item description 2. for the item code 3. for the link of the color picture 4. for the color code and I need to get this information every 10 rows. So I used the OFFSET and ROWS formula.

=OFFSET(Foglio1!$A$2;ROWS($C$7:C7)/10 -> to find item description
=OFFSET(Foglio1!$C$2;ROWS($F$7:F7)/10 -> to find color code

The problem is when I have the same item code with different colors, excel considers it as a new item and puts all the information in the next set of cells, skipping 10 rows. What I would like is excel to identify that if the item code is the same to put the second color code of the item, right below the first one and in the next set of cells i would have the next item code.

I tried to use the IF formula to achieve this, but I don't know what conditions to put to make excel go to the next item code and put other colors codes below the first one.

I am attaching a screenshot of the file. On the left side of the sheet you can find what I did, on the right side i put an example of what i would like the final output to be.

I hope it's clear and you can help me!

Merry Xmas to those who celebrate it.


----------

