• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Raw data convert to Particular Format

ushaanu

Member
HI all,

I have some raw data in excel file which I need to convert to some specific format. This file already have one VBAmacro code but now one new condition add and I am not able to fit new condition with old one . Details Condition example enclosed .
 

Attachments

  • Macro file.xlsm
    965.6 KB · Views: 10
Hi,

You should be very clear to query to get the answers...

I found that there is a mismatch in your highlighted written details which was confusing.

Pls be careful for explanation to get the target answer.

The more clear query is - chances are very high to get answers!!!

Pls check the attached file...

Added below code!


Code:
    If ws1.Range("E" & lngRow) = "C400" Or ws1.Range("E" & lngRow) = "7000" Then
        ws2.Range("D" & lngTRow + 1).Value = ws1.Range("I" & lngRow).Value - ws1.Range("N" & lngRow).Value
        ws2.Range("D" & lngTRow + 3).Value = ws1.Range("K" & lngRow).Value - ws1.Range("M" & lngRow).Value
    End If
 

Attachments

  • Macro file_1.xlsm
    965.2 KB · Views: 2
Hi,

You should be very clear to query to get the answers...

I found that there is a mismatch in your highlighted written details which was confusing.

Pls be careful for explanation to get the target answer.

The more clear query is - chances are very high to get answers!!!

Pls check the attached file...

Added below code!


Code:
    If ws1.Range("E" & lngRow) = "C400" Or ws1.Range("E" & lngRow) = "7000" Then
        ws2.Range("D" & lngTRow + 1).Value = ws1.Range("I" & lngRow).Value - ws1.Range("N" & lngRow).Value
        ws2.Range("D" & lngTRow + 3).Value = ws1.Range("K" & lngRow).Value - ws1.Range("M" & lngRow).Value
    End If


HI Deepak Sir,

Can one more condition add in this code

If in ws1 column E name is 7777 than I+J -N= value shows in ws 2 as a ED123456-LB value like enclosed file.

Regards
Anu
 
Back
Top