+ Reply to Thread
Results 1 to 15 of 15

transpose data for each brand if there is different price based on sheet name

  1. #1
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    transpose data for each brand if there is different price based on sheet name

    Hi
    I want showing data from row6 based on sheet name in B2 in PRICES sheet.
    so should search for different prices in column F for the same brand is existed in column B .
    if there is the same price for another date or the same date then should ignore the price is repeated.
    just show the brand contains different prices ,otherwise should ignore the others brands if contains the same prices or just contain one price.
    should fill empty cells by hypen and clear data from row6 when run the macro every time to update data .
    Attached Files Attached Files
    Last edited by abdo meghari; 04-13-2024 at 04:36 AM.

  2. #2
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    I hope some body help .

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,256

    Re: transpose data for each brand if there is different price based on sheet name

    Geez...You've had so so so many threads with similar requirements...By now you should at least know how to string a little bit of code together...Not even prepared to try?
    Give a man a fish...He'll eat for the day...Teach a man to fish..........
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    there is no similar threads for requirements or give me at least !
    just similar data structure with different requirements.
    try what ?
    this is wasting for time . nobody will check my trying when collect the codes.
    everybody just writing code's owner without interesting if I posted code contains many mistakes so this is wasting of time without any useful .

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,245

    Re: transpose data for each brand if there is different price based on sheet name

    Please Login or Register  to view this content.
    Uses a sheet "TEMP" which is hidden.
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    Hi John,
    I downloaded your attaching and show error subscript out of range in this line
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,245

    Re: transpose data for each brand if there is different price based on sheet name

    The attachment runs OK for me. Are you using different data?

    Try

    Please Login or Register  to view this content.
    Last edited by JohnTopley; 04-13-2024 at 01:49 AM.

  8. #8
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,256

    Re: transpose data for each brand if there is different price based on sheet name

    @ John...I got same error with your code...Post above does solve though...

    @ abdo...

    if there is the same price for another date or the same date then should ignore the price is repeated.
    This below refers to above comment...
    03/02/2024 BS 1200R20 G580 JAP SDF1104 CRTE104 500.00 1,760.00 880,000.00
    04/02/2024 BS 1200R20 G580 JAP SDF1105 CRTE105 120.00 1,760.00 211,200.00

    Why then do you include it in your result...?

    Untitled.png

    Or...If you are including only the first entry and not duplicates then why do you not add the first entry here below...

    Untitled.png



    Also...Your dates in result does not match with dates in data...?
    Last edited by sintek; 04-13-2024 at 04:40 AM.

  9. #9
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    The attachment runs OK for me. Are you using different data?
    no I don't change anything , just use your attaching !
    sorry about dates rrors !
    ok I will see your suggestion how works .

  10. #10
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    @sintek
    when the price is repeated for different dates then will take old date .
    and if there price is one then should totally ignore it.
    sorry about dates error , I've found out when see JT's attching .

  11. #11
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    @JT
    it's great and solves th problm .
    just curiosity in post# 5 when show error I added your code to initial attaching and add Temp sheet as you suggest , then there is no error ,but doesn't show anything in Temp sheet as in your attachment ,why?
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,245

    Re: transpose data for each brand if there is different price based on sheet name

    Uses a sheet "TEMP" which is hidden.
    And TEMP sheet is cleared at end of macro.
    Last edited by JohnTopley; 04-13-2024 at 05:51 AM.

  13. #13
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    in Temp sheet should brings data from PRICE sheet after running macro?
    if it's so why clear Temp sheet?!

  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,245

    Re: transpose data for each brand if there is different price based on sheet name

    "TEMP" is simply a "working" sheet: data is copied from sheet named in B2 [ "PURCHASES"], Sorted and prcocessed in "TEMP" and the results are copied back to "Prices": then "TEMP" is cleared.

  15. #15
    Forum Contributor
    Join Date
    12-02-2020
    Location
    Asia
    MS-Off Ver
    2010 & 2016 insider(Windows 10 64-bit)
    Posts
    724

    Re: transpose data for each brand if there is different price based on sheet name

    I don't understand why your attachment show problem whether error or not show whole data when add
    Loop Until srow >= lr
    but is ok when add your code in initial attaching
    thank you so much for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] filter data based on multiple price for each sheet based on two columns
    By Ali-M in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-26-2021, 04:08 AM
  2. [SOLVED] filter data from multiple sheets based on sheet name and brand
    By leap out in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 01-27-2021, 04:22 PM
  3. Replies: 7
    Last Post: 12-14-2020, 05:52 AM
  4. insert total row every brand repeated when transfer data from sheet to another
    By ABDELFATTA in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-06-2020, 07:22 PM
  5. Brand Map - Price and Volume Mapping - URGENT
    By allyshaik in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 06-02-2014, 03:43 AM
  6. [SOLVED] Data Merging in 1 Sheet from 100 WB - New to the FORUM and Brand New to VBA
    By spiwere in forum Excel Programming / VBA / Macros
    Replies: 66
    Last Post: 01-19-2013, 02:39 PM
  7. Retrieving the Price for a Specified Item and a Specified Brand
    By ExcelTip in forum Tips and Tutorials
    Replies: 0
    Last Post: 08-25-2005, 02:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1