Trouble Understanding Which Formula is needed

gravanoc

Active Member
Joined
Oct 20, 2015
Messages
348
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
Hi, I'm having a major headache right now and can't think straight on this. I've tried a couple of solutions, but still can't wrap my head around what is needed.

Basically, I am trying to return a value from the first tab contingent on whether or not the value underneath cell A1 on that tab is blank or not. It's hard to describe, but I put an explainer in the cell adjacent to where the formula would be.

https://drive.google.com/open?id=1_6ktCot2wQ33RsumUNz7NaA2z6DAePNZ
 
Re: Is this solvable with built-in functions as is?

Should VBA be used?
 
Upvote 0

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Re: Is this solvable with built-in functions as is?

with PowerQuery (Get&Transform) which is built-in to Excel 2016 and above:

Source
SKUNAMEIMAGE
BS02/4-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Vino Veritas Grapes Design (4 Tiles)BS02_4-BSP.jpg
BS02_4-BSP_2.jpg
BS02/6-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Vino Veritas Grapes Design (6 Tiles)BS02_6-BSP.jpg
BS02_6-BSP_2.jpg
BS02_6-BSP_3.jpg
BS05/4-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Tuscan Lemon Design (4 Tiles)BS05_5-BSP.JPG
BS05_5-BSP_2.JPG
BS24X16-VITBACKSPLASH/MURAL: Toscana Grapes (Six Tiles) [R]BS24X16-VIT.jpg
BS24X16-VIT_2.jpg
BS25-VITBACKSPLASH/MURAL: Toscana Grapes 2BS25-VIT.jpg
BS26-VITBACKSPLASH/MURAL: Toscana Grapes 3BS26-VIT.jpg
BS27-VITBACKSPLASH/MURAL: Toscana Grapes 4BS27-VIT.jpg

Result
SKUNAMEImage.1Image.2Image.3
BS02/4-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Vino Veritas Grapes Design (4 Tiles)BS02_4-BSP.jpgBS02_4-BSP_2.jpg
BS02/6-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Vino Veritas Grapes Design (6 Tiles)BS02_6-BSP.jpgBS02_6-BSP_2.jpgBS02_6-BSP_3.jpg
BS05/4-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Tuscan Lemon Design (4 Tiles)BS05_5-BSP.JPGBS05_5-BSP_2.JPG
BS24X16-VITBACKSPLASH/MURAL: Toscana Grapes (Six Tiles) [R]BS24X16-VIT.jpgBS24X16-VIT_2.jpg
BS25-VITBACKSPLASH/MURAL: Toscana Grapes 2BS25-VIT.jpg
BS26-VITBACKSPLASH/MURAL: Toscana Grapes 3BS26-VIT.jpg
BS27-VITBACKSPLASH/MURAL: Toscana Grapes 4BS27-VIT.jpg
Code:
// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    FillD = Table.FillDown(Source,{"SKU", "NAME"}),
    Group = Table.Group(FillD, {"SKU", "NAME"}, {{"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Image", each Table.Column([Count],"IMAGE")),
    Extract = Table.TransformColumns(List, {"Image", each Text.Combine(List.Transform(_, Text.From), "="), type text}),
    Split = Table.SplitColumn(Extract, "Image", Splitter.SplitTextByDelimiter("=", QuoteStyle.Csv), {"Image.1", "Image.2", "Image.3"})
in
    Split

and no, this is not a vba :)
 
Last edited:
Upvote 0
Re: Is this solvable with built-in functions as is?

Thanks, that's awesome.
 
Upvote 0
Re: Is this solvable with built-in functions as is?

You are welcome

btw. this is a simple version because I don't know how many columns of images will be
 
Upvote 0
Re: Is this solvable with built-in functions as is?

here is more flexible version:

Code:
[SIZE=1]// Table1
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    FillD = Table.FillDown(Source,{"SKU", "NAME"}),
    Group = Table.Group(FillD, {"SKU", "NAME"}, {{"Count", each _, type table}}),
    List = Table.AddColumn(Group, "Image", each Table.Column([Count],"IMAGE")),
    Extract = Table.TransformColumns(List, {"Image", each Text.Combine(List.Transform(_, Text.From), "="), type text}),
    SplitCount = Table.AddColumn(Extract, "SCount", each List.Count(Text.Split([Image],"="))),
    MaxCount = List.Max(SplitCount[SCount]),
    Split = Table.SplitColumn(Extract, "Image", Splitter.SplitTextByDelimiter("="), MaxCount)
in
    Split[/SIZE]
 
Upvote 0
Re: Is this solvable with built-in functions as is?

Thanks again. I will hold onto the new version in case it is needed, but the original works fine too since it's just those 3 columns. I already tested it and it all comes out perfectly. I'll need to study this so I can remember it next time this type of issue comes up. I've used the power query editor before, but just for web extraction using RSS feeds. I literally spent 4 hours trying to figure this thing out so you saved me a lot of time!
 
Upvote 0
Try this.
Formula in C2 (your formula) is copied down.
Formula in D2 is copied across as far as you might ever need and down.

Excel Workbook
ABCDEF
1SKUNAMEImage 1 FileImage 2 FileImage 3 File
2BS02/4-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Vino Veritas Grapes Design (4 Tiles)BS02_4-BSP.jpgBS02_4-BSP_2.jpg
3BS02/6-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Vino Veritas Grapes Design (6 Tiles)BS02_6-BSP.jpgBS02_6-BSP_2.jpgBS02_6-BSP_3.jpg
4BS05/4-BSPBACKSPLASH/MURAL: Modular Hand Painted ~ Tuscan Lemon Design (4 Tiles)BS05_5-BSP.JPGBS05_5-BSP_2.JPG
5BS24X16-VITBACKSPLASH/MURAL: Toscana Grapes (Six Tiles) [R]BS24X16-VIT.jpgBS24X16-VIT_2.jpg
6BS25-VITBACKSPLASH/MURAL: Toscana Grapes 2BS25-VIT.jpg
7BS26-VITBACKSPLASH/MURAL: Toscana Grapes 3BS26-VIT.jpg
8BS27-VITBACKSPLASH/MURAL: Toscana Grapes 4BS27-VIT.jpg
WEB
 
Upvote 0
@gravanoc
Please do not post the same question multiple times. Questions of a duplicate nature will be locked or deleted, per #12 of the Forum Rules and points 6 & 7 of the Forum Use Guidelines.
In this case, since both threads had replies, I have merged them but please do not do this in the future.
 
Upvote 0

Forum statistics

Threads
1,214,952
Messages
6,122,458
Members
449,085
Latest member
ExcelError

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